Topic
  • 3 replies
  • Latest Post - ‏2014-02-11T14:19:16Z by SKY@AXA
PeterOL
PeterOL
9 Posts

Pinned topic Name of calling module z/OS

‏2013-12-13T09:47:31Z |

I have a problem I can't seem to do myself - maybe someone know how?

I have to write a PLI routine that can tell which program/module did call me (on z/OS).
So in a submodule I need to figure out the name of the calling module.
I have looked into LE and REG12-pointer to CEECAA (can't find a structure for that in PLI).

So far I can call the CEE-routines but can't find something that tells the name of the calling module.

Any help on this would be great - thanks.

Regards Peter

Updated on 2013-12-13T12:32:36Z at 2013-12-13T12:32:36Z by PeterOL
  • brataj
    brataj
    7 Posts

    Re: Name of calling module z/OS

    ‏2013-12-16T13:18:32Z  

    See

    1.12.1.4 CEETBCK -- Traceback Utility (replaces CEETRCB)
    http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/ceev11c0/1.12.1.4

    This does require some assembly language programming though. See

    5.2.5 Assembler Macros
    http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/CEEA21C0/5.2.5

    for the use of CEEENTRY/CEETERM.

  • Robin400
    Robin400
    36 Posts

    Re: Name of calling module z/OS

    ‏2013-12-16T14:00:14Z  

    There used to be a function, PROCEDURENAME, to do that,

    but it now provdes only the name of the current procedure.

     

    You could use that function in the calling module's CALL statement

    to pass its procedure name to you.

     

    Another way could be to introduce a user-defined condition in your procedure,

    and to SIGNAL that condition (with the corresponding ON-unit containing the SNAP option).

  • SKY@AXA
    SKY@AXA
    4 Posts

    Re: Name of calling module z/OS

    ‏2014-02-11T14:19:16Z  
    • brataj
    • ‏2013-12-16T13:18:32Z

    See

    1.12.1.4 CEETBCK -- Traceback Utility (replaces CEETRCB)
    http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/ceev11c0/1.12.1.4

    This does require some assembly language programming though. See

    5.2.5 Assembler Macros
    http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/CEEA21C0/5.2.5

    for the use of CEEENTRY/CEETERM.

    CEETBCK is useful, can be called from PL/I (without using ASM), but need some CPU > use another way to detect your caller if you use this Information very often.