SYSDSN ENQ Downgrade in JCL

Description: MVS™ Device Allocation has the responsibility of ensuring the integrity of data sets and devices. For data sets, it does this using a GRS ENQ for each data set. When the JCL coder requests DISP=OLD, DISP=NEW or DISP=MOD, Allocation requests an exclusive ENQ with major name SYSDSN and a minor name of the data set. If the JCL coder uses the other disposition, DISP=SHR, Allocation obtains the same ENQ, but with shared control.

Once obtained, the ENQ is not released until the last step in which it is used. So, for a job with five steps, if the first step codes a data set with DISP=NEW and then uses the data set again in step 5 with DISP=SHR, the ENQ is held for all five steps. Further, the ENQ's level of control, initially exclusive in step 1, is never changed, even though step 5 only needs shared control. In this way, Allocation ensures that the data set integrity is not compromised in any way until the job that needed exclusive control gives up the data set or ends. This is the behavior without the new DSENQSHR function.

In the same example but using the new DSENQSHR function, the SYSDSN ENQ would be downgraded from exclusive control to shared control after step 1 since exclusive control is no longer needed for the data set. This allows other jobs which attempt to allocate the data set to have access earlier than the legacy behavior. This parallelism will reduce the IEF099I/IEF861I/IEF863I messages which indicate that a particular job is waiting the data set.

When change was introduced: z/OS® V2R1.

Reference information: