IEFBR14 Utility


Introduction

  • The IEFBR14 is a no-operation or dummy utility supplied by IBM.
  • IEFBR14 utility performs the following tasks -
    • Allocate/create datasets.
    • Delete datasets.
    • Uncatlog Datasets.
    • Catalog Datasets.
    • Setting the return code to zero
  • IEFBR14 performs the above operations on the sequential file (PS) or partitioned dataset (PDS).
  • ISPF 3.2 (Dataset Utility Panel) can also perform operations on datasets in foreground mode. IEFBR14 utility is used for the same purpose but in batch mode.

Syntax

IEFBR14 uses the DISP parameter to process the DD statement that is coded with the EXEC statement by returning the control to z/OS.

//JOBCARD
//*
//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 - Optional. IEFBR14 use it for their output.
  • SYSOUT - Optional. It is used to display file status codes, system abend codes information, and display statement output.
  • SYSDUMP - Optional. The system uses it for dumping when an abend occurs.
  • DD01 - Specifies dataset attributes for creation.

Return Codes -

IEFBR14 returns the below codes -

  • 0 - Specifies the job completed successfully.
  • JCL ERROR - Specifies the JCL has syntactical errors and must be corrected. It is 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)

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--
//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) 

Explaining Example -

  • 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--
//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)

Explaining Example -

  • 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 deletes the datasets through the batch job.
  • 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--
//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)

Explaining Example -

  • 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.