IEBGENER: Copy Tape to DASD, Delete a Dataset

IEBGENER is a popular utility in Mainframe JCL. Sample JCL is given for your reference and by using this you can delete an input data set and copy tape to DASD.

How to delete a dataset in batch job?

  • Answer is using IEBGENER utility

JCL to Delete Dataset Using – IEBGENER JCL Utility

//S1       EXEC PGM=IEBGENER 
//SYSUT1 DD DISP=SHR,DSN=input dataset
//SYSUT2 DD DISP=(,CATLG,DELETE),
// DSN=output dataset,
// DATACLAS=SEQ80
//SYSPRINT DD SYSOUT=*
//SYSIN DD *

JCL to copy Tape to DASD – IEBGENER Utility

//SADCOPY JOB MSGLEVEL=(1,1) 
//COPY EXEC PGM=IEBGENER 
//SYSPRINT  DD SYSOUT=A 
//SYSIN     DD DUMMY 
//SYSUT1    DD DSN=SADUMP.TAPE,UNIT=tape, 
//          VOL=SER=SADOUT,LABEL=(,NL),DISP=SHR, 
//          DCB=(RECFM=FBS,LRECL=4160,BLKSIZE=29120) 
//SYSUT2    DD DSN=SADUMP.COPY,UNIT=dasd, 
//          VOL=SER=SADCPY,DISP=(NEW,CATLG), 
//          DCB=(RECFM=FBS,LRECL=4160,DSORG=PS),AVGREC=K, 
//          SPACE=(4160,(8,4),RLSE)

Also read

Author: Srini

Experienced software developer. Skills in Development, Coding, Testing and Debugging. Good Data analytic skills (Data Warehousing and BI). Also skills in Mainframe.

2 thoughts

Comments are closed.