[Info-vax] Calling $CREPRC in COBOL
Phil Howell
phow9917 at gmail.com
Sat Jun 11 06:10:06 EDT 2022
On Saturday, 11 June 2022 at 6:17:11 pm UTC+10, Richard Maher wrote:
> On 11/06/2022 9:05 am, 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
> Below is an entry response. Need to find whole conversation or
> view-as-tree: -
>
> https://groups.google.com/g/comp.os.vms/c/xJptlKOregU/m/y0s3fbcoqtQJ
>
> https://groups.google.com/g/comp.os.vms/c/xJptlKOregU/m/y0s3fbcoqtQ
>
> https://groups.google.com/g/comp.os.vms/c/TAmi6i8fMo0/m/1f1JnjqS8RsJ
Boldly going where no COBOL has been before
Nice to see dclexh used in anger again
I always found that compiling with /LIST and /MAP=DECLARED
showed you what the layout actually is, rather than what you thought it was
More information about the Info-vax
mailing list