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://www-01.ibm.com/servers/resourcelink/svc00100.nsf/pages/zOSV2R3SA380688/$file/ceev100_v2r3.pdf >> >> 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. >> > >> > -- gil >> > >> > ---------------------------------------------------------------------- >> > For IBM-MAIN subscribe / signoff / archive access instructions, >> > send email to [email protected] with the message: INFO IBM-MAIN >> > >> >> ---------------------------------------------------------------------- >> For IBM-MAIN subscribe / signoff / archive access instructions, >> send email to [email protected] with the message: INFO IBM-MAIN >> > ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
