Peter, thanks, this is pretty much what I am looking for.

Perhaps (thinking of the other responses) I was not sufficiently clear. I am
not trying to write an encapsulated function which is guaranteed to solve
this problem for any case. I have a particular program that may need to
behave differently if it was invoked by "X" as opposed to under all other
circumstances; or perhaps needs to behave differently if it was loaded by
"something else" as opposed to being the jobstep program.

Does JSCBPGMN = "me"? Does JSCBPGMN = "X"? The answers to those questions
are probably all I need.

Thanks much.

Charles

-----Original Message-----
From: IBM Mainframe Discussion List [mailto:[email protected]] On
Behalf Of Peter Relson
Sent: Wednesday, December 05, 2012 4:36 AM
To: [email protected]
Subject: Re: Who loaded me?

JSCBPGMN is the "job step program name". If the question is is "am I a
program whose name matches the job step program name" then that field can be
used to answer. Note that I intentionally did not say "am I the program"
because that can be very very hard to determine, if there are multiple
programs with the same name that are available to be fetched.

Most (intended) started tasks do, for example, for system integrity reasons,
check "was I started as a started task" and if not they exit because they
are being invoked in an unexpected and unsupported (and potentially
malicious) environment . That can be determined using EXTRACT and COMCIBPT
and CIBVERB=X'04' .

If you were linked to or attached there is information via the RB chain and
RBCDE (not a programming interface) which (potentially) locates a CDE or
LPDE which will have a program name.

As mentioned, if you were load'd and call'd, there are no programming
interfaces that will tell you "who loaded". 

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to