September 2007 Technical Tip JCL's RESTART Parameter

When a JCL job abends, you may want to restart the job at the beginning of the abending step. You can do so by adding the RESTART parameter to the JOB card. The format is RESTART=stepname. Here's a simple example:

//KC03B56X JOB (12345678),'BILL QUALLS',
//  CLASS=A,MSGCLASS=H,TIME=(0,2),NOTIFY=KC03B56
//STEP010 EXEC PGM=IEFBR14
//STEP020 EXEC PGM=IEFBR14
//STEP030 EXEC PGM=IEFBR99
//STEP040 EXEC PGM=IEFBR14
//STEP050 EXEC PGM=IEFBR14

Of course, this job will abend with an S806 at STEP030 because program IEFBR99 does not exist. I can fix the JCL, skip STEP010 and STEP020, and begin execution at STEP030 by adding the RESTART parameter to the JOB card as shown here:

//KC03B56X JOB (12345678),'BILL QUALLS',
//  RESTART=STEP030,
//  CLASS=A,MSGCLASS=H,TIME=(0,2),NOTIFY=KC03B56
//STEP010 EXEC PGM=IEFBR14
//STEP020 EXEC PGM=IEFBR14
//STEP030 EXEC PGM=IEFBR14
//STEP040 EXEC PGM=IEFBR14
//STEP050 EXEC PGM=IEFBR14

This job will run to completion, executing STEP030, STEP040, and STEP050 only.

By the way, I recently found a simple JCL tutorial on the internet. Go to http://www.geocities.com/srcsinc/drona/programming/languages/jcl/jcl.chapter1.html You might learn something!

At Caliber Data Training we have provided JCL training to hundreds of people. If you are in need of training on any mainframe topic including TSO/ISPF, JCL, COBOL, PL/I, Assembler, CLIST, Dialog Manager, CICS, VSAM, DB2 or IMS, we hope you will consider Caliber Data Training when deciding upon a training provider.


Go to the articles index. Written by Bill Qualls. Copyright © 2007 by Caliber Data Training 800.938.1222