Referback
A way for a JCL statement to point back to a DD statement earlier in the job, instead of repeating its details.
Also written backward reference, DSN=*., VOL=REF, DCB=*.
A referback, or backward reference, lets a DD statement copy information from an earlier one in the same job. It starts with an asterisk, followed by the step name and DD name.
DSN=*.EXTRACT.OUTFILE means "the same dataset as the OUTFILE DD in step EXTRACT". This is useful with long names, and with temporary datasets, where the system makes up the real name. DCB=*.EXTRACT.OUTFILE copies the record format, length and block size from the earlier DD. VOL=REF can place a new dataset on the same volume as an existing one.
When the earlier DD is inside a PROC, add the PROC step name too: *.STEP1.EXTRACT.OUTFILE.
Referbacks save typing and keep a job consistent: if the dataset name changes, it changes in one place. They can also make a job harder to read, because you have to look back to see what a DD really points at. JESJCL in the job output shows the resolved values.
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.
- Temporary datasetA dataset that exists only while one job runs and is deleted automatically when the job ends.
- DispositionThe DISP parameter, which says whether a dataset already exists, and what to do with it when the step ends normally or fails.
- 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.