IEFBR14 Utility (for Beginners)
Summary
For extensive information, go through the IEFBR14 Utility (for Experienced)
- The IEFBR14 is a no-operation or dummy utility supplied by IBM.
- IEFBR14 uses the DISP parameter to process DD statements specified along with the EXEC statement by returning the control to z/OS.
- IEFBR14 utility perform the following tasks -
- Allocate/create datasets
- Delete datasets
- Uncatlog Datasets
- Catalog Datasets
- Setting return code to zero
- IEFBR14 is used to perform above operations on the sequential file (PS) or partitioned dataset (PDS).
- ISPF 3.2 (Dataset Utility Panel) can also used to perform operations on datasets in foreground mode. IEFBR14 utility is used for the same purpose as part of the batch run.
Syntax -
//Job Card
//*
//STEP1 EXEC PGM=IEFBR14
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSDUMP DD SYSOUT=*
//DD1 DD DSN=datset.name, DISP=(OLD,UNCATLG,..),
// VOLUME=SER=volume-name,UNIT=sys-name
- SYSPRINT - This is an optional DD statement. Utility programs use it for their output.
- SYSOUT - This is an optional DD statement. SYSOUT specifies a system-defined DD name for file status codes, system abend codes information, and the display statement output.
- SYSDUMP - This is an optional DD statement. The system uses it for dumping when an abend occurs.
- DD01 - This DD statement specifies dataset attributes for creation.
Return Codes: -
IEFBR14 returns only below condition codes -
- 0 - Specifies the job completed successfully.
- JCL ERROR - Specifies the JCL has syntactical errors and needs to correct them. This happens when the utility is used to check syntax errors.
Create Datasets -
- IEFBR14 is used to create/allocate empty datasets.
- The disposition to create the dataset is DISP=(NEW,CATLG,DELETE).
Example -
Scenario - Create a PS file using the IEFBR14 utility.
JCL -
----+----1----+----2----+----3----+---4----+---5---+----6---+---7--
//MATEPKI JOB (123),'MTH',CLASS=A,MSGCLASS=A,MSGLEVEL=(1,1),
// NOTIFY=&SYSUID
//************************************************************
//* ALLOCATE PS DATA SET USING IEFBR14 UTILITY
//************************************************************
//STEP01 EXEC PGM=IEFBR14
//DD1 DD DSN=MATEPK.IEFBR14.PSFILE,
// DISP=(NEW,CATLG,DELETE),
// SPACE=(TRK,(3,2),RLSE),
// UNIT=SYSDA,VOLUME=SER=DEVHD4,
// DCB=(DSORG=PS,RECFM=FB,LRECL=80,BLKSIZE=800)
**************************** Bottom of Data ****************************
Output -
Go to Spool (SDSF -> ST) and verify the status in the JESYSMSG DDname of the corresponding job.
********************************* TOP OF DATA **********************************
ICH70001I MATEPK LAST ACCESS AT 11:12:09 ON SATURDAY, AUGUST 20, 2022
IEF236I ALLOC. FOR MATEPKI STEP10
IGD100I 0ABB ALLOCATED TO DDNAME DD1 DATACLAS ( )
IEF142I MATEPKI STEP01 - STEP WAS EXECUTED - COND CODE 0000
IEF285I MATEPK.IEFBR14.PSFILE CATALOGED
IEF285I VOL SER NOS= DEVHD4.
IEF373I STEP/STEP01 /START 2022232.1112
IEF032I STEP/STEP01 /STOP 2022232.1112
CPU: 0 HR 00 MIN 00.01 SEC SRB: 0 HR 00 MIN 00.00 SEC
VIRT: 4K SYS: 228K EXT: 0K SYS: 13476K
IEF375I JOB/MATEPKI /START 2022232.1112
IEF033I JOB/MATEPKI /STOP 2022232.1112
CPU: 0 HR 00 MIN 00.01 SEC SRB: 0 HR 00 MIN 00.00 SEC
******************************** BOTTOM OF DATA ********************************
Explaining Example -
- DD1 DD - This DD statement specifies PS dataset attributes for creation.
- IEF142I MATEPKI STEP01 - STEP WAS EXECUTED - COND CODE 0000 - Specifies the STEP01 completed successfully.
- MATEPK.IEFBR14.PSFILE CATALOGED - Specifies the MATEPK.IEFBR14.PSFILE file successfully created and cataloged.
Uncatalog Datasets -
- Uncataloging removes the dataset entry from the catalog table. So that if you search for the dataset from the Data Set List Utility (=3.4) by providing the dataset's name, you will not be able to find the dataset.
- The disposition to uncatalog the dataset is DISP=(OLD,UNCATLG,..).
Example -
Scenario - Uncatalog the PS and PDS using IEFBR14 utility.
Input PS File - MATEPK.IEFBR14.PSFILE
Input PDS File - MATEPK.IEFBR14.PDSFILE
JCL -
----+----1----+----2----+----3----+----4----+----5----+----6----+----7--
***************************** Top of Data ******************************
//MATEPKU JOB (123),'MTH',CLASS=A,MSGCLASS=A,MSGLEVEL=(1,1),
// NOTIFY=&SYSUID
//******************************************************************
//* UNCATALOG DATA SET USING IEFBR14 UTILITY
//*****************************************************************
//STEP01 EXEC PGM=IEFBR14
//DD1 DD DSN=MATEPK.IEFBR14.PSFILE,
// DISP=(OLD,UNCATLG,DELETE)
//DD2 DD DSN=MATEPK.IEFBR14.PDSFILE,
// DISP=(OLD,UNCATLG,DELETE)
**************************** Bottom of Data ****************************
Output -
Go to Spool (SDSF -> ST) and verify the status in the JESYSMSG DDname of the corresponding job.
********************************* TOP OF DATA **********************************
ICH70001I MATEPK LAST ACCESS AT 11:16:11 ON SATURDAY, AUGUST 20, 2022
IEF236I ALLOC. FOR MATEPKU STEP01
IEF237I 0ABB ALLOCATED TO DD1
IEF237I 0ABB ALLOCATED TO DD2
IEF142I MATEPKU STEP01 - STEP WAS EXECUTED - COND CODE 0000
IEF285I MATEPK.IEFBR14.PSFILE UNCATALOGED
IEF285I VOL SER NOS= DEVHD4.
IEF285I MATEPK.IEFBR14.PDSFILE UNCATALOGED
IEF285I VOL SER NOS= DEVHD4.
IEF373I STEP/STEP01 /START 2022232.1119
IEF032I STEP/STEP01 /STOP 2022232.1119
CPU: 0 HR 00 MIN 00.01 SEC SRB: 0 HR 00 MIN 00.00 SEC
VIRT: 4K SYS: 228K EXT: 0K SYS: 13476K
IEF375I JOB/MATEPKU /START 2022232.1119
IEF033I JOB/MATEPKU /STOP 2022232.1119
CPU: 0 HR 00 MIN 00.01 SEC SRB: 0 HR 00 MIN 00.00 SEC
******************************** BOTTOM OF DATA ********************************
Explaining Solution: -
- DD1 DD * - Specifies PS dataset with DISP for uncatalog (DISP=(OLD,UNCATLG,DELETE)).
- DD2 DD * - Specifies PDS dataset with DISP for uncatalog (DISP=(OLD,UNCATLG,DELETE)).
- MATEPKU STEP01 - STEP WAS EXECUTED - COND CODE 0000 - Specifies the STEP01 completed successfully.
- MATEPK.IEFBR14.PSFILE UNCATALOGED - Specifies the MATEPK.IEFBR14.PSFILE uncataloged successfully.
- MATEPK.IEFBR14.PDSFILE UNCATALOGED - Specifies the MATEPK.IEFBR14.PDSFILE uncataloged successfully.
Catalog Datasets -
- Cataloging makes the dataset entry in the Catalog table with the volume serial number. So that if you search the dataset from the Data Set List Utility (ISPF 3.4) by providing the dataset name, you can find the dataset.
- The disposition to catalog the dataset is DISP=(OLD,CATLG,..).
Example -
Scenario - Catalog the PS and PDS using IEFBR14 utility that are uncataloged earlier.
Input PS File - MATEPK.IEFBR14.PSFILE
Input PDS File - MATEPK.IEFBR14.PDSFILE
JCL -
----+----1----+----2---+---3----+---4---+---5---+---6----+---7--
***************************** Top of Data ******************************
//MATEPKC JOB (123),'MTH',CLASS=A,MSGCLASS=A,MSGLEVEL=(1,1),
// NOTIFY=&SYSUID
//*************************************************************
//* CATALOG DATA SET USING IEFBR14 UTILITY
//*************************************************************
//STEP01 EXEC PGM=IEFBR14
//DD1 DD DSN=MATEPK.IEFBR14.PSFILE,
// VOLUME=SER=DEVHD4,UNIT=SYSDA,
// DISP=(OLD,CATLG,DELETE)
//DD2 DD DSN=MATEPK.IEFBR14.PDSFILE,
// VOLUME=SER=DEVHD4,UNIT=SYSDA,
// DISP=(OLD,CATLG,DELETE)
**************************** Bottom of Data ****************************
Output -
Go to Spool (SDSF -> ST) and verify the status in the JESYSMSG DDname of the corresponding job.
********************************* TOP OF DATA **********************************
ICH70001I MATEPK LAST ACCESS AT 11:19:52 ON SATURDAY, AUGUST 20, 2022
IEF236I ALLOC. FOR MATEPKC STEP01
IEF237I 0ABB ALLOCATED TO DD1
IEF237I 0ABB ALLOCATED TO DD2
IEF142I MATEPKC STEP01 - STEP WAS EXECUTED - COND CODE 0000
IEF285I MATEPK.IEFBR14.PSFILE CATALOGED
IEF285I VOL SER NOS= DEVHD4.
IEF285I MATEPK.IEFBR14.PDSFILE CATALOGED
IEF285I VOL SER NOS= DEVHD4.
IEF373I STEP/STEP01 /START 2022232.1122
IEF032I STEP/STEP01 /STOP 2022232.1122
CPU: 0 HR 00 MIN 00.01 SEC SRB: 0 HR 00 MIN 00.00 SEC
VIRT: 4K SYS: 228K EXT: 0K SYS: 13476K
IEF375I JOB/MATEPKC /START 2022232.1122
IEF033I JOB/MATEPKC /STOP 2022232.1122
CPU: 0 HR 00 MIN 00.01 SEC SRB: 0 HR 00 MIN 00.00 SEC
******************************** BOTTOM OF DATA ********************************
Explaining Solution: -
- DD1 DD * - Specifies PS dataset with DISP for catalog (DISP=(OLD,CATLG,DELETE)).
- DD2 DD * - Specifies PDS dataset with DISP for catalog (DISP=(OLD,CATLG,DELETE)).
- IEF142I MATEPKC STEP01 - STEP WAS EXECUTED - COND CODE 0000 - Specifies the step01 completed successfully.
- MATEPK.IEFBR14.PSFILE CATALOGED - Specifies the MATEPK.IEFBR14.PSFILE cataloged successfully on DEVHD4 volume.
- MATEPK.IEFBR14.PDSFILE CATALOGED - Specifies the MATEPK.IEFBR14.PDSFILE cataloged successfully on DEVHD4 volume.
Delete Datasets -
- ISPF foreground option 3.2 (Data Set Utility panel) is also used to delete the datasets. However, the IEFBR14 utility is used to delete the datasets as part of a batch run.
- The disposition should be DISP=(OLD,DELETE,..) or DISP=(MOD,DELETE,..) to delete the dataset.
Example -
Scenario - Delete the PS and PDS using IEFBR14 utility.
Input PS File - MATEPK.IEFBR14.PSFILE
Input PDS File - MATEPK.IEFBR14.PDSFILE
JCL -
----+----1----+----2----+----3----+---4---+---5---+---6---+---7--
***************************** Top of Data ******************************
//MATEPKD JOB (123),'MTH',CLASS=A,MSGCLASS=A,MSGLEVEL=(1,1),
// NOTIFY=&SYSUID
//*************************************************************
//* DELETE DATA SET USING IEFBR14 UTILITY
//*************************************************************
//STEP01 EXEC PGM=IEFBR14
//DD1 DD DSN=MATEPK.IEFBR14.PSFILE,
// DISP=(OLD,DELETE,DELETE)
//DD2 DD DSN=MATEPK.IEFBR14.PDSFILE,
// DISP=(OLD,DELETE,DELETE)
**************************** Bottom of Data ****************************
Output -
Go to Spool (SDSF -> ST) and verify the status in the JESYSMSG DDname of the corresponding job.
********************************* TOP OF DATA **********************************
ICH70001I MATEPK LAST ACCESS AT 11:22:37 ON SATURDAY, AUGUST 20, 2022
IEF236I ALLOC. FOR MATEPKD STEP01
IEF237I 0ABB ALLOCATED TO DD1
IEF237I 0ABB ALLOCATED TO DD2
IEF142I MATEPKD STEP01 - STEP WAS EXECUTED - COND CODE 0000
IEF285I MATEPK.IEFBR14.PSFILE UNCATALOGED
IEF285I VOL SER NOS= DEVHD4.
IEF285I MATEPK.IEFBR14.PSFILE DELETED
IEF285I VOL SER NOS= DEVHD4.
IEF285I MATEPK.IEFBR14.PDSFILE UNCATALOGED
IEF285I VOL SER NOS= DEVHD4.
IEF285I MATEPK.IEFBR14.PDSFILE DELETED
IEF285I VOL SER NOS= DEVHD4.
IEF373I STEP/STEP01 /START 2022232.1124
IEF032I STEP/STEP01 /STOP 2022232.1124
CPU: 0 HR 00 MIN 00.01 SEC SRB: 0 HR 00 MIN 00.00 SEC
VIRT: 4K SYS: 228K EXT: 0K SYS: 13476K
IEF375I JOB/MATEPKD /START 2022232.1124
IEF033I JOB/MATEPKD /STOP 2022232.1124
CPU: 0 HR 00 MIN 00.01 SEC SRB: 0 HR 00 MIN 00.00 SEC
******************************** BOTTOM OF DATA ********************************
Explaining Solution: -
- DD1 DD * - Specifies PS dataset with DISP for catalog (DISP=(OLD,CATLG,DELETE)).
- DD2 DD * - Specifies PDS dataset with DISP for catalog (DISP=(OLD,CATLG,DELETE)).
- IEF142I MATEPKD STEP01 - STEP WAS EXECUTED - COND CODE 0000 - Specifies the step01 completed successfully.
- MATEPK.IEFBR14.PSFILE UNCATALOGED - Specifies the MATEPK.IEFBR14.PSFILE uncataloged successfully.
- MATEPK.IEFBR14.PSFILE DELETED - Specifies the MATEPK.IEFBR14.PSFILE deleted successfully.
- MATEPK.IEFBR14.PDSFILE UNCATALOGED - Specifies the MATEPK.IEFBR14.PDSFILE uncataloged successfully.
- MATEPK.IEFBR14.PDSFILE DELETED - Specifies the MATEPK.IEFBR14.PDSFILE deleted successfully.