Purpose
The RD (Restart Definition) parameter specifies how a job should be restarted if it fails or is canceled and needs to be resubmitted. It provides control over both automatic step restart and checkpoint restart capabilities, allowing you to determine whether a job can be restarted at all, and if so, how that restart should be handled.
Syntax
JOB Statement Format
//jobname JOB parameters,RD=value
Parameter Values
value
Value | Description |
---|
R | Requests restart at the beginning of the job (first step) if the job fails |
RNC | Requests restart at the beginning of the job, but any checkpoints are to be ignored |
NC | Suppresses automatic step restart and checkpoint restart, even if requested by the RESTART parameter |
NR | Suppresses automatic step restart but allows checkpoint restart if requested by the RESTART parameter |
Note:
If you omit the RD parameter, no automatic restart is requested. However, step restart and checkpoint restart can still be requested using the RESTART parameter.
Usage Examples
Basic Job Restart
//TESTJOB JOB (ACCT),'JOHN DOE',CLASS=A,
// MSGCLASS=X,RD=R
This job will be restarted from the beginning if it fails or is canceled.
Restart Without Checkpoints
//TESTJOB JOB (ACCT),'JOHN DOE',CLASS=A,
// MSGCLASS=X,RD=RNC
This job will be restarted from the beginning if it fails, ignoring any checkpoints taken.
No Restart or Checkpoints
//TESTJOB JOB (ACCT),'JOHN DOE',CLASS=A,
// MSGCLASS=X,RD=NC
This job cannot be restarted automatically and will not use checkpoints, even if specified in the RESTART parameter.
Checkpoints Only
//TESTJOB JOB (ACCT),'JOHN DOE',CLASS=A,
// MSGCLASS=X,RD=NR
This job will not restart automatically but can be restarted from checkpoints if specified in the RESTART parameter.
Restart Concepts
Types of Restart
Automatic Step Restart
When a job step terminates abnormally, the system can automatically restart the job from the beginning of the failing step. This restart occurs without user intervention when the following conditions are met:
- RD=R or RD=RNC is specified on the JOB statement
- The failing step was not already being rerun
- The job is eligible for restart (not in a HOLD state)
- Operator allows the restart when prompted
Checkpoint Restart
A program can establish checkpoints during its execution by issuing the CHKPT macro. If the program fails after establishing checkpoints, it can be restarted from the last checkpoint rather than from the beginning of the step. The RD parameter controls whether these checkpoints are used:
- RD=R allows checkpoint restart
- RD=RNC suppresses checkpoint restart
- RD=NC suppresses checkpoint restart
- RD=NR allows checkpoint restart
Restart Process Flow
- When a job or step abnormally terminates, the system examines the RD parameter
- Based on the RD parameter value, the system decides whether to initiate automatic restart or use checkpoints
- The operator is notified and can choose to allow or prevent the restart
- If restart proceeds, the system positions input data sets at the appropriate points
- Output data sets created by the job before the restart are handled according to disposition parameters
Relationship with Other JCL Parameters
Interaction with RESTART Parameter
The RESTART parameter on the JOB statement specifies where to restart a job. The RD parameter controls whether this restart capability is available:
RESTART Usage | RD Impact |
---|
RESTART=* | RD=NC prevents restart; RD=NR, R, or RNC allows restart |
RESTART=(stepname) | RD=NC prevents restart; RD=NR, R, or RNC allows restart at the specified step |
RESTART=(stepname,checkid) | RD=NC or RD=RNC prevents checkpoint restart; RD=R or RD=NR allows checkpoint restart |
Interaction with SYSCHK DD Statement
When requesting a checkpoint restart, you must include a SYSCHK DD statement to identify the checkpoint dataset:
//SYSCHK DD DSN=checkpoint.dataset.name,DISP=OLD
The SYSCHK DD statement refers to the dataset containing checkpoint records created by the CHKPT macro.
Practical Applications
When to Use Each RD Value
Value | Best Used When |
---|
R | - Long-running jobs that should be restarted automatically if they fail
- Jobs with built-in checkpoint capability that need automatic recovery
- Production jobs that must complete despite system failures
|
RNC | - Jobs that should restart from the beginning regardless of checkpoints
- When checkpoint data might be unreliable or outdated
- When full reprocessing is safer than partial reprocessing
|
NC | - One-time processing jobs that should not be restarted
- Testing and debugging scenarios where retries are not wanted
- Jobs where partial processing could cause data inconsistency
|
NR | - Jobs that should only be restarted manually from checkpoints
- When operator inspection is required before restart
- Debugging scenarios where checkpoint restart is needed but automatic restart is not
|
Common Scenarios
- Batch Update Jobs: Use RD=R for critical batch update jobs to ensure they complete processing
- Data Extraction Jobs: Use RD=RNC when extracting data to ensure complete extraction without partial updates
- Report Generation: Use RD=NC for regular reports that can simply be rerun if they fail
- Database Maintenance: Use RD=NR to allow checkpoint restart only after manual verification of database integrity
Considerations and Limitations
Data Set Integrity
When a job is restarted, data set integrity is a critical concern:
- Input data sets: Must be repositioned correctly for restart
- Output data sets: May contain partial or duplicate data after restart
- NEW data sets: Should use DISP=(NEW,CATLG,DELETE) or DISP=(NEW,CATLG,KEEP) to ensure proper handling
- MOD data sets: May contain duplicate data after restart if not properly managed
Performance Impact
Creating checkpoints has a performance impact on the running job. Each checkpoint operation:
- Writes job state information to the checkpoint dataset
- May force I/O buffers to be written to disk
- Increases job execution time proportionally to checkpoint frequency
Storage Requirements
Checkpoint datasets require disk space to store:
- Program status information
- Open dataset position information
- Contents of the program's storage areas
Best Practices
- Document restart strategy for each production job
- Test restart capability before implementing in production
- Consider data integrity when designing restart options
- Use checkpoints judiciously - too many can impact performance, too few can result in excessive reprocessing
- Coordinate with operations staff to ensure they understand restart options for each job
- Review restart logs to identify patterns or recurring issues
- Maintain checkpoint datasets with appropriate retention periods
- Consider using RD=NC during testing to prevent unintended restarts
Related Concepts