[Info-vax] Calling $CREPRC in COBOL
VAXman- at SendSpamHere.ORG
VAXman- at SendSpamHere.ORG
Mon Jun 20 07:37:06 EDT 2022
In article <t8olit$71c$1 at dont-email.me>, Dave Froble <davef at tsoft-inc.com> writes:
>On 6/10/2022 4:34 PM, 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.
>
>What I'm having a problem with is expecting the linker to find the declared
>external data. PQL_ENQLM is a SYSGEN parameter. Not something the linker could
>find, unless linking against the system image, and I have no idea if linking
>against the system image would provide that parameter.
>
>I could be wrong, hell I'm usually wrong these days. I do not think Brian gave
>enough information.
Brian gave ample information for anyone who has used this abhorrent "launguage"
called COBOL..
PQL$_ENQLM is provided by a simple Macro:
.TITLE PQLDEF
$PQLDEF GLOBAL
.END
This is assembled/complied to create global symbols available at link time. Any
VMS programmer (sh/w)ould be aware of this.
> From my occasional playing with CREPRC what I remember is that the PQL
>parameters are used when a specific parameter is not provided. Thus, just don't
>provide that parameter to CREPRC. I never did.
$PQLDEF definitions are used to create a quota list for the $CREPRC system service
that define process quotes for the created process. Typically, the SYSGEN minimum
and or default quota parameters will suffice for the created process quota for the
crux of most processing.
In this case, the client was calling a module I wrote for them that *dynamically*
loads an environment to produce Ex(h)el spreadsheets. Their own programs are fat!
In fact, their programs are grossly obese. Their new code made "My 600 lbs Life"
look like a documentary on anorexia. When this program was launched, there was an
insufficient page file quota and thus, the program hacked up SS$_INSFMEM hairball
errors when trying to load the dynamically loaded spreadsheet code.
This is what happens when ?programmers? write code like:
PERFORM 1000A-CODE THRU
1000Z-CODE-EXIT.
PERFORM 2000A-CODE THRU
2000Z-CODE-EXIT.
PERFORM 3000A-CODE THRU
3000Z-CODE-EXIT.
:
:
1000A-CODE.
<a line of COBOL>.
1000Z-CODE-EXIT.
2000A-CODE.
<a line of COBOL>.
2000Z-CODE-EXIT.
3000A-CODE.
<a line of COBOL>.
3000Z-CODE-EXIT.
ad infinitum, compiling and linking everything /DEBUG/NOOPTIMIZE and /DEBUG,
and running the programs RUN/NODEBUG. $CREPRC launched programs are jacketed
in a .COM procedure that does '$ RUN/NODEBG <grossly-obese-[A-program>'.
--
VAXman- A Bored Certified VMS Kernel Mode Hacker VAXman(at)TMESIS(dot)ORG
I speak to machines with the voice of humanity.
More information about the Info-vax
mailing list