IEFBR14
A program that does nothing. The DD statements around it do the work.
Also written BR14
Why it matters. Before a job runs, the system makes or removes every dataset its DDs describe. IEFBR14 is the quickest way to use that.
See it
IEFBR14 does nothing. Only the DD statements have an effect.
Syntax
//STEP1 EXEC PGM=IEFBR14 //ddname DD DSN=name,DISP=(OLD,DELETE,DELETE) //ddname DD DSN=name,DISP=(NEW,CATLG),SPACE=(TRK,(1,1))
- DISP=(OLD,DELETE)
- Delete a file that exists.
- DISP=(MOD,DELETE)
- Delete a file, and do not fail if it is missing. Needs SPACE=(TRK,0).
- DISP=(NEW,CATLG)
- Make a new empty file.
- No PARM
- It takes none.
Try it IEFBR14
- 1
You're editing job DELWORK, a step with PGM=IEFBR14. Write the DD that deletes the old file ZB0001.DEV.OLDWORK when the step ends, whether it works or not.
JCL //OLDDD DD DSN=ZB0001.DEV.OLDWORK,DISP=(OLD,DELETE,DELETE) - 2
Submit the job DELWORK from your DEV JCL library.
SUBMIT 'ZB0001.DEV.JCL(DELWORK)' - 3
Read the step messages, JESYSMSG. Find what happened to the file.
OUTPUT DELWORK JESYSMSG
Remember
- IEFBR14 returns at once with code 0.
- The system makes or deletes datasets from the DD statements.
- It is the usual way to clear out an old file before a job. If the file is not there, DISP=(OLD,DELETE) fails with IEF212I. DISP=(MOD,DELETE) with SPACE=(TRK,0) does not.
The usual mistake
Expecting IEFBR14 to copy or change data
It has no code to do that. It only gives the DD statements a step to belong to.
Use IEBGENER to copy and DFSORT to change records
On real z/OS
IEFBR14 works the same in MF/OS: it returns code 0 and the DD statements do the work. On real z/OS the name stands for branch to register 14, the return instruction.
Where can I practise IEFBR14?
Right here, at ZedBank. You take a junior job at a simulated bank and use IEFBR14 in real work, with Zed beside you. There's nothing to install.
Start at ZedBankRelated
- Utility programA supplied program that performs a standard job such as copying, sorting, comparing or managing datasets, driven by control statements.
- DispositionThe DISP parameter, which says whether a dataset already exists, and what to do with it when the step ends normally or fails.
- DD statementThe JCL statement that connects a name inside a program to a real dataset outside it.
- JCLJob Control Language: the language used to tell the mainframe what programs to run, in what order, and with what files.
- Job stepOne program execution within a job. A job is simply a sequence of steps that run in order.