z/OS DFSMSdfp Checkpoint/Restart
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Requesting Serially Reusable Resources

z/OS DFSMSdfp Checkpoint/Restart
SC23-6862-00

Explicit use of a serially reusable resource is requested when the user's program issues the ENQ or RESERVE macro instruction. If the program issues the ENQ or RESERVE macro and takes a checkpoint, it must issue the ENQ or RESERVE macro again whenever restart occurs at the checkpoint.

Figure 1 shows a program that requests a serially reusable resource by issuing an ENQ before establishing a checkpoint. After the checkpoint, the program tests for a restart. If a restart has occurred, the program requests the same resource again. The program requests the resource again because the job step terminated, lost control of the resource, and then restarted from the checkpoint.

Figure 1. Requesting a Resource after Restart
            .
            .
            .
            ENQ  (QADDR,RADDR)
            .
            .
            .
            CHKPT CHKPTDCB
            CH    15,=H'4'
            BNE   NRESTRT
            ENQ   (QADDR,RADDR)
NRESTRT
            .
            .
            .
            DEQ   (QADDR,RADDR)
            .
            .
            .
Some serially reusable resources are requested implicitly by issuing data management macro instructions. These resources may be records that you are processing or tracks on a direct access device. To ensure correct processing, you must not establish checkpoints during control of these resources:
  • If the basic direct access method (BDAM) is used, your program must, before executing the CHKPT macro, execute either the WRITE or the RELEX macro to release a record that is read with exclusive control.
  • If BDAM is used to add a record to a data set with variable-length or undefined records, BDAM issues an ENQ macro instruction for the capacity record (R0). Your program must execute the WAIT or CHECK macro to check completion of the write operation before it executes CHKPT. After execution of the WAIT or CHECK macro, the resources are removed from the queue.
  • If a VSAM cluster is implicitly specified, the restart program obtains the names of the data set and the index from the catalog and reissues an ENQ macro against each of them. Therefore, no special considerations are required.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014