JCL examples


Normal Execution (notice that the job flow is normal):

//jobname JOB . . .
//*
//*-------------------------------------------------
//* STEP TO PRE-ALLOCATE THE MVS CHECKPOINT DATASETS
//*-------------------------------------------------
//*
//PREALLOC EXEC PGM=IEFBR14
//*
//CKPTDD01 DD DSN=hlq.CKPTDD01,
//   DISP=(NEW,CATLG),
//   UNIT=disk,VOL=SER=volume,
//   SPACE=(CYL,(1,1))
//   DCB=(RECFM=U,LRECL=0,BLKSIZE=4096)
//*
//CKPTDD02 DD DSN=hlq.CKPTDD02,
//   DISP=(NEW,CATLG),
//   UNIT=disk,VOL=SER=volume,
//   SPACE=(CYL,(1,1)),
//   DCB=(RECFM=U,LRECL=0,BLKSIZE=4096)
//*
//*-------------------------------------------------
//* STEP TO EXECUTE THE APPLICATION PROGRAM
//*-------------------------------------------------
//*
//APPLPGM EXEC PGM=application-program
//*
//CKPTDD01 DD DSN=hlq.CKPTDD01,DISP=OLD
//*
//CKPTDD02 DD DSN=hlq.CKPTDD02,DISP=OLD
//*
//DSNPARMS DD DSN=hlq.db2name.planname,
//   DISP=(NEW,DELETE,DELETE),
//   SPACE=(TRK,0),
//   UNIT=disk
//*
//SYSPRINT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*

In preparation for a restart:

//jobname    JOB . . .,RESTART=(APPLPGM,C0000007)
//*
//SYSCHK      DD DSN=hlq.CKPTDD01,DISP=SHR
//*
//*-------------------------------------------------
//* STEP TO PRE-ALLOCATE THE MVS CHECKPOINT DATASETS
//*-------------------------------------------------
//*
//PREALLOC EXEC PGM=IEFBR14
//*
//CKPTDD01 DD DSN=hlq.CKPTDD01,
//    DISP=(NEW,CATLG),
//    UNIT=disk,VOL=SER=volume,
//    SPACE=(CYL,(1,1))
//    DCB=(RECFM=U,LRECL=0,BLKSIZE=4096)
//*
//CKPTDD02 DD DSN=hlq.CKPTDD02,
//    DISP=(NEW,CATLG),
//    UNIT=disk,VOL=SER=volume,
//    SPACE=(CYL,(1,1)),
//    DCB=(RECFM=U,LRECL=0,BLKSIZE=4096)
//*
//*-------------------------------------------------
//* STEP TO EXECUTE THE APPLICATION PROGRAM
//*-------------------------------------------------
//*
//APPLPGM   EXEC PGM=application-program
//*
//CKPTDD01  DD DSN=hlq.CKPTDD01,DISP=OLD
//*
//CKPTDD02  DD DSN=hlq.CKPTDD02,DISP=OLD
//*
//DSNPARMS  DD DSN=hlq.db2name.planname,
//          DISP=(NEW,DELETE,DELETE),
//          SPACE=(TRK,0),
//          UNIT=disk
//*
//SYSPRINT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*

Notice the addition of the RESTART=parameter on the job Statement to include the restart Step Name and the restart Checkpoint ID, the addition of the //SYSCHK DD Statement, and the use of the Checkpoint Dataset in the //SYSCHK DD Statement.


 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*

QUICKSTART for MVS 3.4