At 09:07 -0700 on 03/29/2009, Edward Jaffe wrote about Re: ENQ a member of a PDS:

Your program should use existing ISPF serialization mechanisms. A
SPFEDIT SCOPE=SYSTEMS ENQ tells you if a data set or member is currently
being edited; a SPFEDIT SCOPE=SYSTEMS RESERVE is used to serialize
updates to the target library for data integrity. The latter might not
be necessary if the target library is a PDSE (ISPF uses it in all
cases). But, if it's a PDS, failure to properly serialize for update can
lead to unpredictable (but, predictably bad) results!

Doing the ENQ with an RNAME of DSN+MEMBER (DSN is 44 Characters right padded and MEMBER is 8 Characters right padded for a length of 52) is how SPF does it. There is only one GOTCHA (as there is with all the SYSDSN type ENQs) since in a multi-CPU environment the DSN should be unique since the VOLSER is not part of the RNAME even though SPF KNOWS which volume the dataset is on. Thus you can be editing CPU1's version of a data set and lock out editing of CPU2's version (on a different volume) with the same DSN. IBM for historical reasons has been unable to fix this design-flaw of the ENQ System since there are components that do the ENQ before they know which volume the dataset resides on. This should not however prevent SPF from doing ITS ENQ with VOLSER if they wanted to fix this problem (since by the time the ENQ is done the VOLSER is known).

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to