On Tue, 4 Dec 2012 14:19:50 -0800 Charles Mills <[email protected]> wrote:
:>I can look up any one thing in the manuals, but I'm trying to figure out :>what would be the BEST way to do something that is not explicitly :>documented. :>1. What would be the best way for a program running z/OS batch to answer the :>question "Am I the jobstep program, the PGM= program, or was I LOADed and :>CALLed or ATTACHed (let's ignore XCTL for now) by another program? 1. Are you in the top RB of the jobstep TCB? If the answer is no, then you are not the jobstep program. 2. If the above answer is yes, then is your address within the bounds of that load module? If no, you have received control via LOAD and CALL. If yes, and ignoring XCTL, you are part of the EXEC PGM=. Of course, it is possible that the JSprogram called an external program that called you back, so you may be called. :>2. In addition, if the answer to (1.) is "another program," where would I :>find its entry point name? In other words, "who loaded me?" :>Yes, there are some complicating possibilities such as a program between the :>jobstep program and me, but let's ignore that for now. The standard approach is to run the save area chain backwards. You can use CSVQUERY to determine the name from an address. -- Binyamin Dissen <[email protected]> http://www.dissensoftware.com Director, Dissen Software, Bar & Grill - Israel Should you use the mailblocks package and expect a response from me, you should preauthorize the dissensoftware.com domain. I very rarely bother responding to challenge/response systems, especially those from irresponsible companies. ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
