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


How to Ensure Restart with Sequential Checkpoint Data Sets

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

Abnormal termination or system failure may occur while the new entry is written. To ensure that restart at the most recent valid checkpoint is possible, a new checkpoint entry must not be written over a preceding one. The figures below suggest methods by which you can ensure that restart is possible. All of the methods use sequential checkpoint data sets.

Note: Because of the characteristics of PDSs, checkpoint entries with different member names are not written over each other.

Figure 1 shows the use of one sequential checkpoint data set, one data control block, and one DD statement (CHECKDD) specifying MOD disposition. The user allows the checkpoint routine to open and close the data set each time it writes a checkpoint entry. Checkpoint entries are written sequentially in the data set.

Figure 1. Using One Sequential Checkpoint Data Set to Ensure Restart
          Program
            .
            .
            .
            CHKPT     CHKDCB
            .
            .
            .
CHKDCB      DCB  DDNAME=CHECKDD,MACRF=W,DSORG=PS
            .
            .
            .
           DD Statement

//CHECKDD  DD  UNIT=TAPE,DISP=(MOD,KEEP),DSN=WAREHOUS.DB1.CHK

Alternatively, you can have your program open the data set and leave it open. The disposition of the data set may be NEW, OLD, or MOD. This method uses one sequential checkpoint data set, one DCB, and one DD statement.

Figure 2 shows a way to alternate data sets when all checkpoints are taken by one CHKPT macro instruction. The data sets are opened by the control program and identified by two DD statements, CHECKDD1 and CHECKDD2. The data control block (DCB) initially refers to CHECKDD1. Before the second checkpoint, the DCB is changed to refer to CHECKDD2; before the third checkpoint, the DCB is again changed to refer to CHECKDD1; and so forth. One data control block can be used for two data sets that are not open at the same time.

An alternative method of using two sequential data sets is to use two DCBs and two DD statements specifying NEW or OLD dispositions, and to execute alternately two CHKPT macro instructions. Each CHKPT macro instruction then refers to a different data set.

The method illustrated in Figure 1 saves all checkpoint entries for possible use in deferred restart. The method illustrated in Figure 2 conserves auxiliary storage. None of the methods requires a particular device type.

Figure 2. Using Two Sequential Checkpoint Data Sets to Ensure Restart
         Program

           LA    2,CHECKDCB          Establish CHECKDCB as
*                                    base address for
           USING IHADCB,2            IHADCB
           XC    DCBDDNAM(8),DDHOLD  Exchange ddname in
           XC    DDHOLD(8),DCBDDNAM  CHECKDCB for ddname
           XC    DCBDDNAM(8),DDHOLD  in DDHOLD
           CHKPT CHECKDCB            Open, checkpoint, close
           .
           .
           .
DDHOLD     DC    C'CHECKDD1'
CHECKDCB   DCB   DSORG=PS,MACRF=(W),DDNAME=CHECKDD2
           DCBD  DSORG=PS            Define IHADCB (dummy
*                                    section that defines
*                                    DCBDDNAM)

         DD Statements

//CHECKDD1 DD UNIT=SYSDA,DISP=NEW ...
//CHECKDD2 DD UNIT=SYSDA,DISP=NEW ...

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014