JCL RESTART Parameter with Examples

This topic covers the JCL Restart parameter with Examples.As the name suggests this is used to Restart a JOB from any particular step instead of starting it from the beginning. This is very useful for the jobs with multiple steps and abends after executing few steps. In this case as few job steps were already got executed and they generated required output. So starting from beginning is not required and this may cause abnormal results as the process has run already. RESTART is the solution in this case where it starts the JOB from the given step Name.

Where to Code:
This should be coded in the JOB Card.

Syntax:

RESTART= stepname

Example: In A job There are 10 steps starting from step01 thru step10 and if the job needs to be restarted from the 5th step then below is the sample code.

//PROD70 JOB MSGLEVEL=(1,1),MSGCLASS=X,RESTART=STEP05

If required restart step is part of any PROC then the syntax would be

RESTART = procstepname.stepname

Here procstepname is the Step name in the main JOB where actually that PROC is being executed.
Stepname is part of the PROC from where the JOB should be restarted.

Below example shows a JOB PROD80 which executes two PROCs named PROC01 and PROC02. But the JCL has abneded in JSTEP2 while executing the PRCSTP02 of PROC02. So to restart it from the PRCSTP02 of PROC02 the restart should be coded as shown below.

//PROD80 JOB MSGLEVEL=(1,1),MSGCLASS=X,RESTART=JSTEP2.PRCSTP02
//JSTEP1 EXEC PROC PROC01
//SYSPRINT DD *
//SYSIN DD DUMMY 
//JSTEP2 EXEC PROC PROC02
//SYSIN DD DUMMY 
//

PROC02:

//PROC02 PROC 
//*
//PRCSTP01 EXEC PROG=PROG01
//SYSOUT DD *
//*
//PRCSTP02 EXEC PROG=PROG02
//*
//SYSOUT DD *
/

What is RESTART = * .
This means that the job should be started from the beginning.

Above discussed part comes under Deferred step restart and there is another way  which is called Deferred checkpoint restart (DCR). DCR starts a JCL from a checkpoint taken. Checkpoints are taken by using a macro CHKPT.

Add a Comment

Your email address will not be published. Required fields are marked *

Close Bitnami banner