DD statement
The JCL statement that connects a name inside a program to a real dataset outside it.
Also written //DD, data definition
DD stands for data definition. These statements do the most interesting work in JCL: they connect the file names a program uses internally to actual datasets on the system.
A COBOL program does not name a dataset in its code. It refers to a file by a symbolic name, and the DD statement with that name supplies the real dataset when the job runs. That indirection is the whole point. The same compiled program can process test data one day and production data the next, with only the JCL changing.
A DD statement says which dataset to use, whether it already exists or is being created, what should happen to it when the step ends, and if it is new, how big it should be and what shape its records are.
It can also supply data directly inline in the JCL, which is how utilities receive their control statements, and it can direct output to the spool for you to read afterwards.
Most JCL errors people meet early are DD errors, and most of those are a name that does not match or a dataset that is not where it was expected.
Related terms
- JCLJob Control Language: the language used to tell the mainframe what programs to run, in what order, and with what files.
- DispositionThe DISP parameter, which says whether a dataset already exists, and what to do with it when the step ends normally or fails.
- SYSOUTOutput sent to the spool rather than to a dataset, where you can read it after the job finishes.
- DatasetWhat a mainframe calls a file: a named collection of records with a defined structure, rather than a loose stream of bytes.
- Space allocationReserving disk space for a dataset up front, in tracks, cylinders or blocks, with room to grow.
- EXEC statementThe JCL statement that starts a step by naming the program or procedure to run.