Restarting a batch program
To restart a batch program that updates data, first run the IMS Batch Backout utility, followed by a restart job indicating the last successful checkpoint ID.
About this task
For guidelines on finding the last successful checkpoint, see Finding the DL/I batch checkpoint ID.
Examples
- Example: Batch checkout with JCL
- The skeleton JCL example that follows illustrates a batch backout for PSB=IVP8CA.
//ISOCS04 JOB 3000,ISOIR,MSGLEVEL=(1,1),NOTIFY=ISOIR, // MSGCLASS=T,CLASS=A //* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //* * //* BACKOUT TO LAST CHKPT. * //* IF RC=0028 LOG WITH NO-UPDATE * //* * //* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - * //BACKOUT EXEC PGM=DFSRRC00, // PARM='DLI,DFSBBO00,IVP8CA,,,,,,,,,,,Y,N,,Y', // REGION=2600K,COND=EVEN | //* ---> DBRC ON //STEPLIB DD DSN=IMS.RESLIB,DISP=SHR //IMS DD DSN=IMS.PSBLIB,DISP=SHR // DD DSN=IMS.DBDLIB,DISP=SHR //* //* IMSLOGR DD data set is required //* IEFRDER DD data set is required //DFSVSAMP DD * OPTIONS,LTWA=YES 2048,7 1024,7 /* //SYSIN DD DUMMY /*
- Example: restarting a DL/I batch job with JCL
- Operational procedures can restart a DL/I batch job step for an application program using IMS XRST and symbolic CHKP calls.
You cannot restart a BMP application program in a Db2 DL/I batch environment. The symbolic checkpoint records are not accessed, causing an IMS user abend U0102.
To restart a batch job that terminated abnormally or prematurely, find the checkpoint ID for the job on the z/OS® system log or from the SYSOUT listing of the failing job. Before you restart the job step, place the checkpoint ID in the CKPTID=value option of the DLIBATCH procedure, submit the job. If the default connection name is used (that is, you did not specify the connection name option in the DDITV02 input data set), the job name of the restart job must be the same as the failing job. Refer to the following skeleton example, in which the last checkpoint ID value was IVP80002://ISOCS04 JOB 3000,OJALA,MSGLEVEL=(1,1),NOTIFY=OJALA, // MSGCLASS=T,CLASS=A //* ****************************************************************** //* //* THE FOLLOWING STEP RESTARTS COBOL PROGRAM IVP8CP22, WHICH UPDATES //* BOTH DB2 AND DL/I DATABASES, FROM CKPTID=IVP80002. //* //* ****************************************************************** //RSTRT EXEC DLIBATCH,DBRC=Y,COND=EVEN,LOGT=SYSDA, // MBR=DSNMTV01,PSB=IVP8CA,BKO=Y,IRLM=N,CKPTID=IVP80002 //G.STEPLIB DD // DD // DD DSN=prefix.SDSNLOAD,DISP=SHR // DD DSN=prefix.RUNLIB.LOAD,DISP=SHR // DD DSN=SYS1.COB2LIB,DISP=SHR // DD DSN=IMS.PGMLIB,DISP=SHR //* other program libraries //* G.IEFRDER data set required //* G.IMSLOGR data set required //G.DDOTV02 DD DSN=&TEMP2,DISP=(NEW,PASS,DELETE), // SPACE=(TRK,(1,1),RLSE),UNIT=SYSDA, // DCB=(RECFM=VB,BLKSIZE=4096,LRECL=4092) //G.DDITV02 DD * DB2X,SYS1,DSNMIN10,,A,-,BATCH001,,IVP8CP22 /* //*************************************************************** //*** ALWAYS ATTEMPT TO PRINT OUT THE DDOTV02 DATA SET *** //*************************************************************** //STEP8 EXEC PGM=DFSERA10,COND=EVEN //STEPLIB DD DSN=IMS.RESLIB,DISP=SHR //SYSPRINT DD SYSOUT=A //SYSUT1 DD DSNAME=&TEMP2,DISP=(OLD,DELETE) //SYSIN DD * CONTROL CNTL K=000,H=8000 OPTION PRINT /* //