RESTART Parameter


Note! RESTART parameter can be coded only at the job level.

What is RESTART?

RESTART is used to restart the job execution from a specific step (at which step the job failed). The step can be a job step, a procedure step, or a checkpoint.

RESTART is a keyword parameter and is optional. RESTART parameter is not always coded with the job card and only codes when resubmitting the job after abend.

When to RESTART?

Let us assume a job has multiple steps, and the job abended after a few steps of execution. The few steps that are completed successfully doesn't require to execute again. In this case, we will code the RESTART parameter at the job card with the failed step. Due to this, the completed steps are bypassed, and the job execution starts from the given step.

Syntax -

RESTART=stepname[.procname]
(or)
RESTART=*
* Specifies the job execution starts from the first step.
It is the default value if the RESTART parameter is not coded.
Stepname Specifies the step name where the execution should start.
Procname Specifies the PROC name in which procedure the RESTART step is coded.
It is optional if the step is not in PROC.

Default and overrides -

If no RESTART is coded in the job, the execution will start from the beginning.

JOB starts execution from the first step of the JCL by default. If the restart step is different from the first step of the procedure, then the user needs to specify the step name in the PROC.

Examples -


Scenario1 - Restart from STEP02.

//MTHEXMP1 JOB (MTH123),'PAWAN Y',RESTART=STEP02
//STEP01   EXEC PGM=PROGA
//STEP02   EXEC PGM=PROGB
//STEP03   EXEC PGM=PROGC
//STEP04   EXEC PGM=PROGD

The job starts executing from STEP02.

Scenario2 - Restart from STEP01.

//MTHEXMP2 JOB (META007),'PAWAN Y',RESTART=*
//STEP01   EXEC PGM=PROGA
//STEP02   EXEC PGM=PROGB
//STEP03   EXEC PGM=PROGC
//STEP04   EXEC PGM=PROGD

The job starts executing from STEP01.

Scenario3 - Restarting from first step of PROCB.

//MTHEXMP3 JOB (META007),'PAWAN Y',RESTART=PROCB
//STEP01   EXEC PGM=PROGA
//STEP02   EXEC PGM=PROGB
//STEPPR1  EXEC PROCB
//STEP05   EXEC PGM=PROGE
//STEP06   EXEC PGM=PROGF
//PROCB
//STEP03   EXEC PGM=PROGC
//STEP04   EXEC PGM=PROGD

The job starts executing from STEP03 in the PROCB.

Scenario4 - Restarting from STEP04 of PROCB.

//MTHEXMP4 JOB (META007),'PAWAN Y',RESTART=PROCB.STEP04
//STEP01   EXEC PGM=PROGA
//STEP02   EXEC PGM=PROGB
//STEPPR1  EXEC PROCB
//STEP05   EXEC PGM=PROGE
//STEP06   EXEC PGM=PROGF
//PROCB
//STEP03   EXEC PGM=PROGC
//STEP04   EXEC PGM=PROGD

The job starts executing from STEP04 in the PROCB.