Enqueuing—ENQ
The following material describes enqueue options for data set serialization. Enqueues are done on the data set name for the data set copy, data set dump, data set restore, defragment, print, compress, and release operations to prevent multiple, simultaneous updates to the same data set.
- For the RESTORE command, SHARE applies to non-VSAM data sets only.
- For the DUMP and COPY commands, SHARE applies to non-VSAM data sets and VSAM data sets that are defined with share options other than (1,3) and (1,4).
If you do not specify the SHARE option, DFSMSdss tries to provide the highest level of data integrity by defaulting to exclusive enqueuing. The command is in a wait state for X seconds if the enqueue fails. WAIT specifies X (numsecs, numretries), and retries the enqueue. If the wait-enqueue sequence fails after Y retries (where WAIT specifies Y (numsecs, numretries)), data set processing ends.
In the case of a multistep job where the initiator holds a shared enqueue on the data set, DFSMSdss upgrades the enqueue to exclusive unless SHARE is specified. The initiator holds the exclusive enqueue until the last step in the job that references the data set has completed.
If you specify the SHARE keyword, DFSMSdss tries an enqueue for share. If it fails, it goes through the same logic as if SHARE had not been specified. If the retries all fail, processing ends for the data set.
Table 1 shows the data set enqueue options.
TOLERATE(ENQFAILURE) can be used on VSAM and non-VSAM data sets.
Options | None | SHARE | TOLERATE(ENQFAILURE) | SHARE and TOLERATE(ENQFAILURE) |
---|---|---|---|---|
Type of enqueue attempted | Exclusive | Share | Exclusive | Share |
If enqueue is successful | Process | Process | Process | Process |
If enqueue is not successful | Do not process | Do not process | Process without enqueue | Process without enqueue |