[Info-vax] Calling $CREPRC in COBOL
abrsvc
dansabrservices at yahoo.com
Fri Jun 10 22:04:41 EDT 2022
On Friday, June 10, 2022 at 9:05:25 PM UTC-4, Richard Maher wrote:
> On 11/06/2022 1:39 am, VAX... 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"?
> >
> Unfortunately COBOL has never supported by integers but there are
> several ways to do it. (I haven't fired up my VMS machines in 5 years
> otherwise I'd give you an example. Back in the day when google groups
> could search the archives you could find one of several $creprc examples
> with all parameters including TCB)
>
> Cumbersome: -
>
> 01 enqlm_word pic 9(4) comp value external pql$_enqlm.
> 01 enqlm_byte redefines enqlm_word.
> 03 pql_enqlm pic x.
>
> move pql_enqlm to somewhere.
>
> Lose external symbols and hard code: -
>
> Hexadecimal literals:
>
> 10 ENQ-TYPE PIC X(1) VALUE x"00".
>
> Special Names:
>
> SPECIAL-NAMES.
> PQL$_ENQLM value is 44. (I don't know the value)
>
> 10 ENQ-TYPE PIC X(1) VALUE PQL$_ENQLM.
>
> The way I do it: -
>
> Define a global .PSECT in the same .MAR file that you already probably
> do for $pqldef GLOBAL
>
> Just lay it out as you would for macro.
>
> .psect fred long, gbl,shr,wrt,blah
>
> .byte pql$_enqlm
>
> Then declare an EXTERNAL variable as the same name as your global psect.
>
> 01 fred external.
> 03 pql$_enqlm pic x. (doesn't have to be same name)
> 03 pic x.
>
> * The last byte is NECESSARY to round up the psect size on Alpha, and
> * Itanium. Macro does this automatically.
>
> Again many examples in cov over the years
The other issue here is that this one value is part (or all) of the itemlist that is for the quota parameter.of CREPRC.
The entire list structure must be built, not just this one value.
More information about the Info-vax
mailing list