Disposition
The DISP parameter, which says whether a dataset already exists, and what to do with it when the step ends normally or fails.
Also written DISP
Disposition, written DISP, appears on DD statements and answers three questions in one parameter: what is the state of this dataset now, what should happen to it if the step succeeds, and what should happen if the step fails.
The first part is the status. NEW creates the dataset, OLD claims exclusive use of an existing one, SHR shares an existing one with other work, and MOD adds to the end of one.
The second and third parts decide its fate. It can be kept, catalogued so it can be found by name later, deleted, or passed to a following step in the same job.
The combination matters more than it sounds. A step that creates a work file and deletes it on failure leaves nothing behind to confuse a rerun. A step that catalogues its output on success makes that output available to tomorrow's job. And requesting exclusive use of a dataset another job is holding is one of the most common reasons a job sits waiting rather than running.
Related terms
- DD statementThe JCL statement that connects a name inside a program to a real dataset outside it.
- DatasetWhat a mainframe calls a file: a named collection of records with a defined structure, rather than a loose stream of bytes.
- CatalogThe system's index of where datasets live, so you can refer to a dataset by name without knowing which disk it is on.
- Job stepOne program execution within a job. A job is simply a sequence of steps that run in order.
- JCLJob Control Language: the language used to tell the mainframe what programs to run, in what order, and with what files.
- Generation data groupA set of datasets holding successive versions of the same file, so today's copy, yesterday's and last week's all exist under one name.