[Info-vax] Calling $CREPRC in COBOL

Rich Alderson news at alderson.users.panix.com
Fri Jun 10 16:15:24 EDT 2022


Yes, I do know about things other than PDP-10s...

VAXman-  @SendSpamHere.ORG writes:

> In article <t804ht$a69$1 at dont-email.me>, "Craig A. Berry"
> <craigberry at nospam.mac.com> writes:

>> On 6/10/22 1:27 PM, Bill Gunshannon wrote:

>>> On 6/10/22 14:16, Craig A. Berry wrote:

>>>> On 6/10/22 12:39 PM, VAXman- at SendSpamHere.ORG wrote:

>>>>>    10  ENQ-TYPE      PIC X(1)  VALUE EXTERNAL PQL$_ENQLM.
>>>>> ..............^
>>>>> %COBOL-E-EXTREFVAL, VALUE EXTERNAL clause ignored - valid only on COMP
>>>>> data-item

>>>>> How do you put PQL$ items in to a COBOL "byte"?

>>>> I never knew much COBOL and haven't looked at any in decades, but I would
>>>> think for a one-byte integer it would be "PIC 9(1)" rather than "PIC
>>>> X(1)".

>>> PIC X(1) would be more likely to be a byte than PIC 9(1) as
>>> PIC 9(1) is one decimal digit and PIC X(1) is one character.

>>> But neither is correct.

>> So, since you frequently brag about your COBOL prowess here, why not
>> give the correct answer?

>> I did forget that "size" doesn't actually mean size but rather display
>> digits or something.  "PIC 9(9) COMP" is a 4-byte integer, "PIC 9(4)
>> COMP" is a 2-byte integer.  By extension, "PIC 9(3) COMP" *might* be a
>> 1-byte integer, but I couldn't quickly find any documentation on it.

> You and Bill know more than I about COBOL.  It doesnt even look like code to
> me.

> The customer said that they got this code many years ago.  The problem is
> that without defining those quotas, a process can not run a new piece of
> code.  They don't understand it and call it "SPAWNing" which is how they do
> most of their COBOL (COBOL writes .COM, LIB$SPAWN runs it).  Fugly.

https://support.hpe.com/hpesc/public/docDisplay?docId=c04621339&docLocale=en_US

See page 5-99 and pages 5-138 to 5-149 of the HPE COBOL Reference Manual.  The
appropriate incantation would appear to be

	10 ENQ-TYPE PIC X USAGE IS COMP-5 VALUE EXTERNAL PQL$_ENQLM.
                          ^^^^^^^^^^^^^^^

Possibly use COMP-X instead of COMP-5.  Note that these USAGEs are only
available on Alpha or Itanium processors.

Also note that "X(1)" is redundant; "X" is a single byte specification.

-- 
Rich Alderson					  news at alderson.users.panix.com
      Audendum est, et veritas investiganda; quam etiamsi non assequamur,
	  omnino tamen proprius, quam nunc sumus, ad eam perveniemus.
									--Galen



More information about the Info-vax mailing list