[Info-vax] Calling $CREPRC in COBOL
Bill Gunshannon
bill.gunshannon at gmail.com
Fri Jun 10 16:49:35 EDT 2022
On 6/10/22 16:34, Craig A. Berry wrote:
>
> On 6/10/22 2:57 PM, Bill Gunshannon wrote:
>> On 6/10/22 15:03, Craig A. Berry wrote:
>>>
>>> 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 have no idea what POL$_ENOLM means or what he is trying to do with it.
>> A rough guess would be rather than declaring it external he needs to
>> use some VMS Specific function to grab the value and load it into
>> ENO-TYPE.
>
> If SDL produces COBOL text libraries and there is a way to include them
> (some variant of COPY?) then yes, he might be able to do the equivalent
> of "#include <pqldef.h>" and not need the external declaration. But the
> external declaration is an ancient hack that at one time was more
> reliable than depending on the existence of programmer-friendly
> definitions, and also, if you were willing to link at installation time,
> could insulate against version-specific changes to the symbol value.
COBOL does have the equivalent of #include but that wasn't what I was
thinking of. It looked to me based on the one line of code!) like he
was trying to get some value from the VMS environment and assign it to
ENO-TYPE. I thought there might be a pre-defined, VMS specific function
to get that value making it possible to to do something like:
10 ENO-TYPE PIC 999.
......
MOVE FUNCTION VMS$GET_VALUE(POL$ENQLM) TO ENO-TYPE.
But, obviously, there is a VMS specific method for doing it rather than
a COBOL way of doing it. :-)
bill
More information about the Info-vax
mailing list