🖥 JCL
JCL Utilities - IEFBR14
Beginner 🕑 8 min read
👁 0 views
8
Code Example
## JCL Utilities - IEFBR14
IEFBR14 is the simplest utility program - it does nothing except return code 0. Used for dataset allocation and deletion.
### Purpose
- Create empty datasets
- Delete datasets
- Rename (via DISP)
- Test JCL syntax
### How It Works
IEFBR14 executes immediately and ends. The JCL DD statements perform the actual work through DISP processing.
### Creating a Dataset
\`\`\`jcl
//CREATE EXEC PGM=IEFBR14
//NEWFILE DD DSN=MY.NEW.FILE,
// DISP=(NEW,CATLG),
// UNIT=SYSDA,
// SPACE=(TRK,(10,5))
\`\`\`
### Deleting a Dataset
\`\`\`jcl
//DELETE EXEC PGM=IEFBR14
//DELFILE DD DSN=MY.OLD.FILE,
// DISP=(MOD,DELETE)
\`\`\`
### Delete if Exists
\`\`\`jcl
//DELETE EXEC PGM=IEFBR14
//DELFILE DD DSN=MY.FILE,
// DISP=(MOD,DELETE,DELETE)
\`\`\`
If file doesn't exist, step gets RC=0.
### Common Uses
1. Pre-allocate output files
2. Clean up temporary files
3. Create empty PDS
4. Test space requirements