JCLbeginner

Dataset Disposition (DISP) Deep Dive

Fully understand the three-part DISP parameter — status, normal termination, abnormal termination — and how it governs dataset access and lifecycle.

DISP is deceptively simple-looking but is the single JCL parameter most likely to trip up candidates in an interview, because it packs three independent decisions into one comma-separated clause: what state the dataset is in right now, what should happen to it if the step ends normally, and what should happen if the step abends. Getting all three right, every time, is a core production-readiness skill.

DISP is a three-line note left on a shared conference room whiteboard: whether you're booking a new room or joining one already reserved (status), what to do with the whiteboard notes if the meeting goes well (normal disposition), and what to do with them if the meeting gets cancelled halfway through (abnormal disposition).

Key Concepts

1
The first subparameter — status — is NEW (create it), OLD (require exclusive access to an existing dataset), SHR (allow shared/concurrent read access to an existing dataset), or MOD (append to an existing dataset, or create it if it doesn't exist yet, behaving like NEW in that case). Choosing SHR when a step actually writes to the dataset is a classic data-integrity bug waiting to happen, since multiple jobs could then write concurrently without any serialization.
2
The second subparameter — normal disposition — controls what happens if the step completes without abending: KEEP (retain the physical dataset but don't catalog it, relying on other means to locate it later), CATLG (retain it and add/update its catalog entry so it can be found by name alone), DELETE (physically remove it), or PASS (retain it uncataloged for a later step in the same job to pick up). The third subparameter — abnormal disposition — applies the same options but only if the step abends, letting you express intent like 'catalog on success, but delete any partial output if we crash.'
3
A favorite interview trap is DISP=(NEW,CATLG,DELETE) versus DISP=(NEW,CATLG,CATLG) — the second means even a crashed, partially-written dataset gets catalogued and left behind for someone to find and be confused by later, which is precisely the kind of subtle production mistake experienced JCL programmers know to avoid.