>ISGQUERY will give you information about ENQs and RESERVEs...
>It has nothing to do with OPEN/CLOSE.

True, but there is a strong correlation between OPEN and Allocate and the 
SYSDSN ENQ that usually accompanies the allocation.
So I think of the OP's request as querying the SYSDSN ENQ for the data set 
in question to see who holds it.

On our system we have a "WHO" command that perhaps uses GQSCAN or ISGQUERY 
to obtain the information about who has the data set ENQ.

I'd also note that if you have an interface that gives you back an ASID 
you can determine the (current) jobname from that ASID programmatically 
via LOCASCB and the ASSB fields ASSBJBNI and ASSBJBNS (those two being 
slightly safer than the pointers in ASCBJBNI and ASCBJBNS). Serialization 
and/or recovery is needed if the ASID might "go away" (as the ASCB/ASSB 
could be freed).

Peter Relson
z/OS Core Technology Design


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

Reply via email to