On Mon, 12 Sep 2016 09:25:02 -0700, Charles Mills <charl...@mcn.org> wrote:

>@Walt, I would call the exact, full answer to that question proprietary, but a 
>hopefully-adequate answer is "report it as-is to humans in >human-readable 
>form." In other words, I don't intend to base additional machine processing on 
>it -- such as attempting to find it in the 
>load library chain. So I'm pretty flexible -- I would not have a problem with 
>a solution that was "arguable" for some scenarios. I am 
>prepared to say "this is the answer we give to this question -- if you don't 
>like it, well, sorry."

That helps; thanks. 

For the non-UNIX case you could consider using your current TCB's pointer to 
TCBJSTCB (jobstep task TCB) then follow the RB chain to the end (first RB), 
find its CDE, and get the module name from that CDE.

Several failure scenarios I can think of off-hand:
(1) An authorized program is running in your address space, and it attached 
multiple jobstep TCBs. Workaround: There's a field that identifies the 
cross-memory owning TCB,  which should be the first one the initiator attached, 
and would give you a better answer. But I don't remember the name of the field.

(2) The program the initiator attached might have done an XCTL and transferred 
control to another module, and you would get the name of that second module. 
There's no workaround using this set of control blocks, as far as I know. You 
might need something different, perhaps using SWA.

(3) This doesn't tell you anything about where the program came from, so when 
you report that it was program X they'll have no idea which copy of X it was. 
And while the installation might know that they've covered the possibility of 
multiple copies of X within their libraries, a user might have a totally 
unrelated X in one of his libraries that the installation won't know about.


I don't remember enough about the control block chasing for the UNIX case.

-- 
Walt

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to