Re: COBOL question: How to dynamically get the name of the routine that called you

2023-05-02 Thread Farley, Peter
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

Re: COBOL question: How to dynamically get the name of the routine that called you

2023-05-02 Thread Bernd Oppolzer
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

Re: COBOL question: How to dynamically get the name of the routine that called you

2023-05-02 Thread Schmitt, Michael
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

Re: COBOL question: How to dynamically get the name of the routine that called you

2023-05-02 Thread Joe Monk
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 >

Re: COBOL question: How to dynamically get the name of the routine that called you

2023-05-02 Thread Schmitt, Michael
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

COBOL question: How to dynamically get the name of the routine that called you

2023-05-02 Thread Farley, Peter
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