5 Super Ideas to Restart of Job or Step in JCL

A job or step may fail in a mainframe batch project. Here are the tips you need to restart. Below, you’ll find how to restart a step or Job after it fails and what happens if you don’t do that.

Restart parameter in JCL

  • RESTART parameter can be coded only in Job statement
  • So RESTART parameter handles the only job failures
  • It cannot be used in EXEC or Step

How to restart when job-step fails

  • The RD parameter you can use in both Job and Exec statements
  • The RD can handle both Job failures and System Failures
  • When RD=R or RD=RNC, the system will perform automatic restart either job or step
Advertisements
RRestart, checkpoints allowed. This option allows the system to automatically restart the execution of a job or job step from the beginning or from the last checkpoint.
RNCRestart, no checkpoints. This option allows the system to perform an automatic step restart when the job or job step fails. Automatic and deferred checkpoint restarts aren’t allowed.
NRNo automatic restart, checkpoints allowed. This option suppresses automatic restarts but permits deferred checkpoint restarts.
NCNo automatic restart, no checkpoints. This option indicates that the system can’t perform an automatic step restart if the job or job step fails and that checkpoint restarts aren’t allowed.

JCL Checkpoint Parameter: How to use in COBOL/PL1

  • The CHKPT parameter in the DD statement will allow you to write Checkpoint in a file
  • CHKP=EOV, when the end of volume arrives during file processing, after the restart, it checks the entry in Checkpoint file and from that point, it continues.
  • In COBOL, you need to mention the RERUN clause in the I-O-CONTROL section and assigns the DD name. So checkpoint will write into the data set of DD name.
  • How to use COBOL RERUN Check here

You May Also Like: How to Skip Steps From Proc

How JOB Restarts automatically in JES2 and JES3

If the system fails, you can automatically restart a job using a JES control statement.

In a JES2 environment, you use the RESTART parameter on a /*JOBPARM statement to queue the job for re-execution after a system IPL. If a RESTART parameter isn’t coded, N is assumed unless the installation overrides the default during JES2 initialization.

In a JES3 environment, you use the FAILURE parameter on a //*MAIN statement to indicate the recovery option to use if the system fails. If the FAILURE parameter isn’t coded, a default failure option will be assigned based on job class.

RESTART=Y/N

What happens when you do not restart

  1. All the downstream systems will be impacted
  2. Escalation will happen with production issues
  3. Clients and Users will have BIG business impact.

You May Also Like: How to Restart Proc Step

Related Posts

Author: Srini

Experienced software developer. Skills in Development, Coding, Testing and Debugging. Good Data analytic skills (Data Warehousing and BI). Also skills in Mainframe.