Master Mainframe Technologies - COBOL, JCL, DB2, VSAM, CICS & More
ABEND Codes SQLCODEs File Status Interview Prep Contact
🖥 JCL

JCL Restart and Checkpoint

Advanced 🕑 15 min read 👁 0 views

15

Code Example


## JCL Restart and Checkpoint

Implement restart capabilities for long-running jobs to avoid reprocessing from the beginning.

### RESTART Parameter (JOB)
\`\`\`jcl
//JOBNAME JOB ...,RESTART=stepname
//JOBNAME JOB ...,RESTART=(stepname,checkid)
//JOBNAME JOB ...,RESTART=*
\`\`\`

### RD Parameter (JOB/EXEC)
\`\`\`jcl
RD=R       Automatic restart
RD=RNC     Restart, no checkpoint
RD=NR      No restart
RD=NC      No checkpoint
\`\`\`

### Automatic Restart
System can automatically restart job from last checkpoint after system failure.

### Checkpoint/Restart
1. Program writes checkpoints
2. On restart, begin from last checkpoint
3. Checkpoint dataset preserved

### Manual Restart
After job failure:
1. Modify JCL with RESTART=stepname
2. Adjust DD statements for completed work
3. Resubmit job

### SYSCHK DD
\`\`\`jcl
//SYSCHK DD DSN=MY.CHKPT.FILE,DISP=...
\`\`\`

### Best Practices
1. Checkpoint at logical intervals
2. Keep checkpoint files
3. Document restart procedures
4. Test restart scenarios