TSO-ISPF JCL COBOL VSAM DB2 CICS IMS-DB Tools Articles Forum Quiz Interview Q&A

JCL - IEFBR14 Utility


The utility program IEFBR14 performs no action other than return a completion code of 0; however, "running" this utility invokes other system components that perform useful tasks.

  1. Allocate/create datasets

  2. Delete datasets

  3. Uncatlog Datasets

  4. Catalog Datasets

  5. Setting return code to zero

We mostly use IEFBR14 utility to create or delete the PS(partition dataset) file.


Example 1: Allocate/Create empty PS dataset.

//JOBIBMKS  JOB (123),'IBMMAINFRAMER',CLASS=C,MSGCLASS=S,MSGLEVEL=(1,1),
//       NOTIFY=&SYSUID
//**********************************************************************
//* ALLOCATE PS DATA SET USING IEFBR14 UTILITY
//**********************************************************************
//STEP001  EXEC PGM=IEFBR14
//SYSPRINT DD SYSOUT=*
//SYSOUT   DD SYSOUT=*
//SYSDUMP  DD SYSOUT=*
//DD01     DD DSN=userid.TEST.PSFILE,
//            DISP=(NEW,CATLG,DELETE),VOLUME=SER=DEVL,
//            SPACE=(TRK,(1,1),RLSE),UNIT=SYSDA,
//            DCB=(DSORG=PS,RECFM=FB,LRECL=80,BLKSIZE=800)
//*

OUTPUT: This job will create the PS(userid.TEST.PSFILE) with defined parameter value.

Explanation:

  • SYSPRINT - Used by utility programs for their output.

  • SYSOUT - Specifies system defined dd name used for file status codes, system abend codes information and output of the display statement.

  • SYSDUMP - Used by the system for dumping when an abend occurs that causes a system dump.

  • DD01 DD - Specifies PS dataset attributes for creation.


Example 2: Delete PS dataset.

//JOBIBMKS JOB (123),'IBMMAINFRAMER',CLASS=C,MSGCLASS=S,MSGLEVEL=(1,1),
//       NOTIFY=&SYSUID
//**********************************************************************
//* DELETE A DATA SET USING IEFBR14 UTILITY
//**********************************************************************
//STEP001  EXEC PGM=IEFBR14
//SYSPRINT DD SYSOUT=*
//SYSOUT   DD SYSOUT=*
//SYSDUMP  DD SYSOUT=*
//DD01     DD DSN=userid.TEST.PSFILE,
//            DISP=(OLD,DELETE,DELETE)
//*

OUTPUT: This job will delete the PS(userid.TEST.PSFILE) dataset.

Explanation:

  • SYSPRINT - Used by utility programs for their output.

  • SYSOUT - Specifies system defined dd name used for file status codes, system abend codes information and output of the display statement.

  • SYSDUMP - Used by the system for dumping when an abend occurs that causes a system dump.

  • DD01 DD - Specifies PS dataset with DISP for deletion (DISP=(OLD,DELETE,DELETE)).



If you have any doubts or queries related to this chapter, get them clarified from our Mainframe experts on ibmmainframer Community!

Are you looking for Job Change? Job Portal