TSO-ISPF JCL COBOL VSAM DB2 CICS IMS-DB Tools Articles Forum Quiz Interview Q&A

JCL - Restart Parameter


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.

Syntax:

RESTART=  stepname or stepname.procstepname

Let us see some examples,

Example 1:

//LINES  JOB  '1/17/95',RESTART=STEP2
//STEP1   EXEC .....
//  .....
//STEP2   EXEC .....
//  .....

Description:

This JOB statement indicates that the system is to restart execution at the beginning of the job step named STEP1.

Example 2:

//MATEKSD JOB MSGLEVEL=(1,1),NOTIFY=&SYSUID,RESTART=STEP05
//*
//* EXAMPLE TO RESTART PARAMETERS
//*
//STEP01   EXEC PGM=PGM1
//STEP02   EXEC PGM=PGM2
//STEP03   EXEC PGM=PGM3
//STEP04   EXEC PGM=PGM4
//STEP05   EXEC PGM=PGM5
//STEP06   EXEC PGM=PGM6
//STEP07   EXEC PGM=PGM7
//STEP08   EXEC PGM=PGM8
//*

Description:

This JOB statement indicates that the system is to restart execution at the beginning of the job step named STEP05. So the step before STEP04 don't execute.

Example 3:

//TESTCTLG JOB 100,CLASS=C,MSGCLASS=Y,NOTIFY=&SYSUID,RESTART=STEP1.STEP07
//*
//MYLIBS1  JCLLIB  ORDER=userid.PROCS.JCL
//*
//STEP1 EXEC CTLGPROC
//*

Catalog Procedure:

//CTLGPROC PROC
//*
//STEP01   EXEC PGM=PGM1
//STEP02   EXEC PGM=PGM2
//STEP03   EXEC PGM=PGM3
//STEP04   EXEC PGM=PGM4
//STEP05   EXEC PGM=PGM5
//STEP06   EXEC PGM=PGM6
//STEP07   EXEC PGM=PGM7
//STEP08   EXEC PGM=PGM8
//*

Description:

This JOB statement indicates that the system is to restart execution at the beginning of the job step named STEP07 inside the PROC.

Here Stepname(i.e. STEP1) is the Step name in the main JOB where actually that PROC is being executed. procstepname(i.e. STEP07) is part of the PROC from where the JOB should be restarted.


If you have any doubts or queries related to this chapter, get them clarified from our Mainframe experts on ibmmainframer Community!

Are you looking for Job Change? Job Portal