JCL RESTART

JCL - REGION JCL – SCHENV

Advertisements


RESTART is used to restart the execution from a particular step.

The step can be JOB step, procedure step or a check point.

Normally RESTART parameter will be used to start execution of a particular step from where it’s got abended.

Restarts can be of two types:


  • Restarting at the beginning of a job step(Deferred step restart).
  • Restarting from a checkpoint taken during step execution by a CHKPT macro instruction (Deferred checkpoint restart).

Syntax:

RESTART = [stepname.]procname
(or)
RESTART = *    

* Indicates to specify the job execution starts from step1.

The step can be job first step or procedure first step if the EXEC calling any procedure.

Stepname Indicates the step where the execution starts from during the restart.

If the step name refers procedure, then the step name in the procedure must be specified.

Procname Indicates the procedure name in which procedure the RESTART step existed.

JOB starts execution from the first step of the JCL by default.

If restart step is different from first step of procedure, then user need to specify the step name in the procedure.

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


Example 1:

//MTHEXMP1 JOB (META007),'PAWAN Y', RESTART=*
//STEP01   EXEC PROG=A
.
.
//STEP02   EXEC PROG=B

This JOB statement indicates that job needs to start execution from STEP01.


Example 2:

//MTHEXMP2 JOB (META007),'PAWAN Y', RESTART=STEP02
//STEP01   EXEC PROG=A
.
.
//STEP02   EXEC PROG=B

This JOB statement indicates that job needs to start execution from STEP02.


Example 3:

//MTHEXMP3 JOB (META007),'PAWAN Y', RESTART=STEP02.PROCB
//STEP01   EXEC PROG=A
.
.
//STEP02   EXEC PROCB


//PROCB
//STEP01   EXEC PROG=B
.
.
//STEP02   EXEC PROG=C

This JOB statement indicates that job needs to start execution from STEP01 of PROCB.


Example 4:

//MTHEXMP3 JOB (META007),'PAWAN Y', RESTART=STEP02.PROCB.STEP02
//STEP01   EXEC PROG=A
.
.
//STEP02   EXEC PROCB


//PROCB
//STEP01   EXEC PROG=B
.
.
//STEP02   EXEC PROG=C

This JOB statement indicates that job needs to start execution from STEP02 of PROCB.


JCL - REGION JCL – SCHENV

Advertisements