Thanks Michael, I tried your routine here and it did exactly what I needed, so
thank you.
Peter
-Original Message-
From: IBM Mainframe Discussion List On Behalf Of
Schmitt, Michael
Sent: Tuesday, May 2, 2023 3:06 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: COBOL question: How to
Is this z/OS? I hope so ...
You say:
I need this for determining from where a high-usage subroutine is being called
unnecessarily in a large main program
(many called modules with multiple levels of CALL, but no recursion).
are these modules separate load modules which are dynamically called
I am attempting to post the assembler program here for reference, we'll see if
the listserv accepts it without mangling.
To use, call it passing the area you want it to return the calling program name
in. The call_level_e equate controls how many levels up it goes.
--
setc
You use the LE service CEETBCK. This is the traceback utility and can be
used to walk the call chain backwards from Enteprise COBOL.
Joe
On Tue, May 2, 2023 at 12:08 PM Schmitt, Michael
wrote:
> I wrote an assembler subprogram that gets the name of the caller of the
> caller, i.e. if A > B >
I wrote an assembler subprogram that gets the name of the caller of the caller,
i.e. if A > B > asm, it returns A. Or any number of levels up that you want. It
works for static and dynamic calls, for both Language Environment compatible
and non-LE programs.*
The logic to get the program name
This is an Enterprise COBOL V5/6 question. No earlier compiler versions are
involved.
Is it possible for a called COBOL program to dynamically determine the name of
the calling COBOL program (i.e., the PROGRAM-ID value)? I have been reading
the LE Vendor Interfaces manual but I have yet to