DD DUMMY
A DD statement that gives a program an empty input or throws away its output, without changing the program.
Also written DUMMY, NULLFILE, DSN=NULLFILE, dummy dataset
DD DUMMY tells a program that a dataset is there when it is not. For input, the first read returns end of file straight away. For output, everything the program writes is thrown away. DSN=NULLFILE has the same effect.
The program does not know the difference. It opens the DD, reads or writes, and closes it as normal, so no code change is needed.
This is useful in many situations. A PROC may have an optional input that most runs do not need. A test run may not need a large report, so its output DD is set to DUMMY. A utility may require a DD that your run does not use.
Take care in production. A DUMMY on an input that should have data means the job finishes cleanly having processed nothing, and that can go unnoticed. When a job "ran fine but did nothing", check for DUMMY on its input DD statements.
Where can I learn this hands-on?
Right here, at ZedBank. You take a junior job at a simulated bank and learn each part of the work by doing it, with Zed beside you. There's nothing to install.
Start at ZedBankRelated
- DD statementThe JCL statement that connects a name inside a program to a real dataset outside it.
- SYSOUTOutput sent to the spool rather than to a dataset, where you can read it after the job finishes.
- Instream dataData typed directly inside the JCL, after a DD * statement, instead of being kept in a separate dataset.
- JCLJob Control Language: the language used to tell the mainframe what programs to run, in what order, and with what files.
- SYSPRINTThe conventional DD name a program uses for its messages and report output.