Which can get very tricky indeed when the CALL is from an input or output exit 
routine of a COBOL internal SORT.  Trying to find your way back through the 
SORT interface routines can be frustrating at best, and impossible at worst.

Peter

-----Original Message-----
From: IBM Mainframe Discussion List <[email protected]> On Behalf Of 
Brian Chapman
Sent: Tuesday, September 22, 2020 8:02 PM
To: [email protected]
Subject: Re: Determining program name/number of paramaters from called COBOL 
program

Correction:  you can chain through the resister save area and use the *caller's 
entry point* (not CEECAA)to chain to the caller's PPA and retrieve the program 
name.

Thank you,

Brian Chapman


On Tue, Sep 22, 2020 at 7:39 PM Brian Chapman <[email protected]> wrote:

> If the called program is assembler and the caller is COBOL (linked 
> with LE), then you can chain through the resister save area and use 
> the CEECAA to chain to the caller's PPA and retrieve the program name. 
> This method really only works for called assembler programs; don't bother 
> with COBOL.
>
> The number of passed parameters is the easy part. Just use the 
> register save area to read the addresses in register 1 looking for the 
> high order bit.
>
> On Tue, Sep 22, 2020, 6:50 PM Joe Monk <[email protected]> wrote:
>
>> Well, here is the answer to at least part of the puzzle, if not all...
>>
>> "You can find the name of the calling programs from a COBOL V5 or V6 
>> program at run time by using the LE service CEETBCK. For more 
>> information, see the z/OS® Language Environment® Vendor Interfaces."
>>
>>
>> https://urldefense.com/v3/__https://www-01.ibm.com/servers/resourceli
>> nk/svc00100.nsf/pages/zOSV2R3SA380688/$file/ceev100_v2r3.pdf__;!!Ebr-
>> cpPeAnfNniQ8HSAI-g_K5b7VKg!axDL42ZaIQJjblemDbSHZnQhdTAajb-KDr_hnzIti1
>> zjkD_ysD8R-DiKvbel6an7sJvSHA$
>>
>> Joe
>>
>>
>> On Tue, Sep 22, 2020 at 5:42 PM Paul Gilmartin < 
>> [email protected]> wrote:
>>
>> > On Tue, 22 Sep 2020 21:51:34 +0000, Farley, Peter x23353 wrote:
>> >
>> > >Current Enterprise COBOL compilers (and back as far as I know, 
>> > >even
>> COBOL
>> > F-level from MVT) always mark the last parameter address in the 
>> > address list with the bit 0 turned on, though I have not researched 
>> > what current ones do if the last parameter is "BY VALUE".
>> > >
>> > >Again for current Enterprise COBOL versions, the LE Vendor 
>> > >Interfaces
>> > manual available in KC has the PPA1 format and in general how to 
>> > locate
>> it.
>> > >
>> > The answer depends on agreement between the designers of the 
>> > calling and called programs.  Lacking such agreement there's no 
>> > general solution.
>> >
>> > C programs called by a POSIX shell can rely on argc, but only 
>> > because that's specified in the Standard.
>> >
-- 

This message and any attachments are intended only for the use of the addressee 
and may contain information that is privileged and confidential. If the reader 
of the message is not the intended recipient or an authorized representative of 
the intended recipient, you are hereby notified that any dissemination of this 
communication is strictly prohibited. If you have received this communication 
in error, please notify us immediately by e-mail and delete the message and any 
attachments from your system.


----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to