🖥 JCL
JCL DISP Parameter
Beginner 🕑 12 min read
👁 0 views
12
Code Example
## JCL DISP Parameter
The DISP (Disposition) parameter specifies the status of a dataset before, during, and after step execution.
### Syntax
\`\`\`jcl
DISP=(status,normal-end,abnormal-end)
\`\`\`
### Status (Before Step)
| Value | Meaning |
|-------|---------|
| NEW | Create new dataset |
| OLD | Exclusive access to existing |
| SHR | Shared access to existing |
| MOD | Add to end of existing/new |
### Normal End Disposition
| Value | Meaning |
|-------|---------|
| DELETE | Delete the dataset |
| KEEP | Keep but don't catalog |
| CATLG | Keep and catalog |
| PASS | Pass to next step |
| UNCATLG | Uncatalog but keep |
### Abnormal End Disposition
Same options as normal end.
### Common Combinations
\`\`\`jcl
DISP=SHR Shared read (default KEEP,KEEP)
DISP=OLD Exclusive access
DISP=(NEW,CATLG,DELETE) Create, catalog if OK
DISP=(MOD,CATLG) Append to file
DISP=(,PASS) Pass temporary file
DISP=(NEW,DELETE) True temporary
\`\`\`
### Defaults
- Status: NEW (if DSN not cataloged)
- Normal: KEEP for OLD/SHR, DELETE for NEW
- Abnormal: Same as normal