I have found the discussion interesting, particularly in what has not been 
said (or perhaps I missed it).

The OP asked about an ENQ. The post did not indicate what resource it 
wanted to ENQ on (and as Tom Marchant point out, it is of course critical 
that all players in a serialization game use the same serialization, such 
as the same ENQ Qname/Rname).

The discussion then decided that this must be a SYSDSN ENQ, and delved 
into SWA.
Of course, ENQ's have nothing to do with SWA. Allocations do. Thus we are 
really talking about two thing -- allocating a data set and obtaining the 
ENQ that by protocol is by name associated with that data set. DEQ does 
nothing with SWA. Unallocations do. If you want to get SWA "cleaned up", 
you must unallocate (or pass some termination point at which the system 
would choose to do it for you).

Getting back to the OP, my first question would have been what they are 
trying to accomplish/serialize? If it's to keep one job from running while 
another is, then as has been suggested use of a specific data set 
*allocation* (even a relatively "dummy" data set that is not even opened) 
in both jobs can accomplish that. That relies on the processing that was 
discussed of allocating data sets for the entire job (thus also ENQing) 
and then DEQing only when no longer needed.

It is rarely a good idea to get on your own an ENQ that is managed by the 
system.

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