IEFBR14 Examples

Examples of IEFBR14 in JCL: It is an IBM utility used in JCL which does nothing so it is also considered as a DUMMY utility. IEFBR14 does nothing but when running this utility other systems services gets invoked which can perform useful tasks like allocating, creating data sets or deleting data sets etc. So this utility allows the steps to execute and it only sets the return code to Zero on a successful execution of the step.

IEFBR14 Uses:

  • Useful to create/delete data sets.
  • Syntax Checking
  • Can be used to SET the return code to Zero.
  • IN most of the cases, it is used in the first Step to delete the output data sets in a JOB that is scheduled to run multiple times with the same output data set names.
  • Useful in testing to check the syntax errors before the actual programs gets submitted. Replacing the original program name with IEFBR14 and submitting gets the syntax check done.

Example- Daily or weekly jobs which produces output data sets with a specific name. For next runs of the job, if the generate output data set is not deleted, job gets failed so to avoid this generated data sets must be deleted before the next run. So this utility can be used to delete these generated files.

IEFBR14 Example to allocate/CREATE a new Data set:

//**********************************************************************
//** CREATE FILES **
//**********************************************************************
//CRT01 EXEC PGM=IEFBR14 
//CR01 DD DSN=MSTR.CUST.PROD.IN01,DISP=(NEW,CATLG,DELETE), 
// SPACE=(TRK,0),UNIT=SYSDA,DCB=(RECFM=FB,LRECL=100,BLKSIZE=1000) 
.
.
.

Example to Delete a Dataset:

//**********************************************************************
//** DELETE THE FILES **
//**********************************************************************
//DELETE EXEC PGM=IEFBR14 
//DD01 DD DSN=MSTR.CUST.PROD.REPORT01,DISP=(MOD,DELETE), 
// SPACE=(TRK,0),UNIT=SYSDA 
//DD02 DD DSN=MSTR.CUST.PROD.REPORT02,DISP=(MOD,DELETE), 
// SPACE=(TRK,0),UNIT=SYSDA 
.
.

Add a Comment

Your email address will not be published. Required fields are marked *

Close Bitnami banner