RESTART parameter - IBM-JCL

Parameter Type

Keyword, optional

Note: Do not specify this parameter for a started task; if RESTART is specified, the job will fail.

Purpose

Use the RESTART parameter to indicate the step, procedure step, or checkpoint at which the system is to restart a job. You can specify that the system perform either of two restarts:

  • Deferred step restart, which is a restart at the beginning of a job step.
  • Deferred checkpoint restart, which is a restart from a checkpoint taken during step execution by a CHKPT macro instruction.

Considerations for an APPC Scheduling Environment

The RESTART parameter has no function in an APPC scheduling environment. If you code RESTART, the system will check it for syntax and ignore it.

1.Syntax

RESTART= ({* } [,checkid] ) ({stepname } ) ({stepname.procstepname} )
  • You can omit the outer parentheses if you code only the first subparameter.
  • The RESTART parameter cannot have a null value.

2.Subparameter Definition

* Indicates that the system is to restart execution (1) at the beginning of or within the first job
step or (2), if the first job step calls a cataloged or in-stream procedure, at the beginning of or
within the first procedure step.

stepname
Indicates that the system is to restart execution at the beginning of or within a job step. If stepname refers to an EXEC statement that invokes a procedure, the step name of the step within the procedure must also be specified.

stepname.procstepname
Indicates that the system is to restart execution at the beginning of or within a step of a cataloged procedure. Stepname identifies the EXEC statement of the job step that calls the procedure; procstepname identifies the EXEC statement of the procedure step. The step identified by procstepname must contain the PGM keyword rather than invoke a procedure.

checkid
Specifies the name of the checkpoint at which the system is to restart execution. This checkpoint must be in the job step specified in the first subparameter.

Omit checkid to request restart at the beginning of the specified job step.

When the name contains special characters, enclose it in apostrophes. Code each apostrophe that is part of the name as two consecutive apostrophes. For example, code CHPT'1 as 'CHPT''1'.

3.Relationship to Other Control Statements
When the system is to restart execution in a job step, place a SYSCHK DD statement immediately following the JOB statement. The SYSCHK DD statement defines the data set on which the system entered the checkpoint for the step being restarted.

When preparing for a deferred checkpoint, code the DISP abnormal termination disposition subparameter in the step’s DD statements as follows:

  • KEEP, to keep all data sets that the restart step is to use.
  • CATLG, to catalog all data sets that you are passing from steps preceding the restart step to steps following the restart step.

In JES2 systems, you can also use the RESTART parameter on the /*JOBPARM control statement.

In JES3 systems, you must also code the FAILURE parameter on the //*MAIN control statement.

4.Cautions when Coding the RESTART Parameter
Before resubmitting a job:

  • Check all backward references to steps before the restart step. Eliminate all backward references in EXEC statement PGM parameters and DD statement VOLUME=REF parameters.
  • Review all EXEC statement COND parameters. If any of the COND parameters reference a step before the restart step, be aware that the system ignores the return code tests for those steps.
  • Note that the stepname and procstepname specified to identify the restart step must be unique within the job. Otherwise, the system will not be able to determine the correct restart step. Results will be unpredictable.
  • Review all IF/THEN/ELSE/ENDIF structures. If a relational expression references a step that is bypassed by the RESTART keyword, the system evaluates that part of the expression as false.

5.Generation Data Sets in Restarted Jobs
In the restart step or following steps, do not use the original relative generation numbers to refer to generation data sets that were created and cataloged before the restart step. Instead, refer to a generation data set by its present relative generation number.

For example, if the last generation data set created and cataloged was assigned a generation number of +2, refer to it as 0 in the restart step and following steps.

If generation data set +1 was also created and cataloged, refer to it as −1. If generation data sets created in the restart step were kept instead of cataloged, that is, DISP=(NEW,CATLG,KEEP) was coded, then refer to them by the same relative generation numbers used to create them.

6.Examples of the RESTART Parameter

Example

//LINES JOB ’1/17/85’,RESTART=COUNT

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

Example

//@LOC5 JOB ’4/11/86’,RESTART=(PROCESS,CHKPT3) //SYSCHK DD DSNAME=CHK,UNIT=3330,DISP=OLD

The JOB statement indicates that the system is to restart execution at checkpoint CHKPT3 in job step PROCESS. The SYSCHK DD statement must follow the JOB statement; it defines the data set on which the system wrote checkpoint CHKPT3.

Example

//WORK JOB ,PORTER,RESTART=(*,CKPT2) //SYSCHK DD DSNAME=CHKPT,UNIT=3330,DISP=OLD

The JOB statement indicates that the system is to restart execution at checkpoint CKPT2 in the first job step. The SYSCHK DD statement defines the data set on which the system wrote checkpoint CKPT2.

Example

//CLIP5 JOB ,COLLINS,RESTART=(PAY.WEEKLY,CHECK8) //SYSCHK DD DSNAME=CHKPT,UNIT=3350,DISP=OLD

The JOB statement indicates that the system is to restart execution at checkpoint CHECK8 in procedure step WEEKLY. PAY is the name field on the EXEC statement that calls the cataloged procedure that contains procedure step WEEKLY. The SYSCHK DD statement defines the data set on which the system wrote checkpoint CHECK8.


All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

IBM-JCL Topics