Source: http://publib.boulder.ibm.com/infocenter/zos/v1r9/index.jsp?topic=/com.i bm.zos.r9.ieab600/xdddisp.htm
DISP and ENQ: Before starting the first step of a job, the initiator requests control of all of the data sets in that job by issuing an ENQ for each of them, using the value specified for DISP to determine the kind of ENQ issued. The initiator issues the ENQ for each data set at the highest level required for that data set by any step of the job. For example, if all steps of the job request shared control of a specific data set (DISP=SHR) then the ENQ for that data set is requested as SHR. If, on the other hand, any step of the job requests exclusive control of a specific data set (DISP=NEW, DISP=MOD, or DISP=OLD), then the ENQ for that data set is requested EXCL. The ENQ for each dataset is released at the end of the last step of the job referencing it. Since ENQs cannot be downgraded from EXCL to SHR, if one step needs the ENQ EXCL and a following step only needs it SHR, the ENQ is still issued as EXCL and held until the end of the last step which references that data set, at which point the ENQ is released entirely. HTH, Greg Shirey Ben E. Keith Company -----Original Message----- Sent: Tuesday, July 06, 2010 3:18 PM To: IBM-MAIN@bama.ua.edu Subject: Re: ENQ trap for dynamic allocation >the EXC ENQ is held until the last step that uses the data set has completed I always thought it was until the end of the job. Thus the need for FREE=CLOSE. ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html