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
|R||Restart, 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.|
|RNC||Restart, 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.|
|NR||No automatic restart, checkpoints allowed. This option suppresses automatic restarts but permits deferred checkpoint restarts.|
|NC||No 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.
What happens when you do not restart
- All the downstream systems will be impacted
- Escalation will happen with production issues
- Clients and Users will have BIG business impact.
You May Also Like: How to Restart Proc Step