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

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
    ACCEPTED ANSWER

    Re: Name of calling module z/OS

    ‏2013-12-16T13:18:32Z  in response to PeterOL

    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.

    • SKY@AXA
      SKY@AXA
      4 Posts
      ACCEPTED ANSWER

      Re: Name of calling module z/OS

      ‏2014-02-11T14:19:16Z  in response to brataj

      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.

       

       

  • Robin400
    Robin400
    30 Posts
    ACCEPTED ANSWER

    Re: Name of calling module z/OS

    ‏2013-12-16T14:00:14Z  in response to PeterOL

    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).