IEBGENER is a popular utility in Mainframe JCL. Sample JCL is given for your reference and by using this utility you can delete an input data set.
The same question asked in an interview.
How to delete a dataset in batch job?
- Answer is using IEBGENER utility
//S1 EXEC PGM=IEBGENER
//SYSUT1 DD DISP=SHR,DSN=input dataset
//SYSUT2 DD DISP=(,CATLG,DELETE),
// DSN=output dataset,
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
- Syntax of JCL continuation to next line
- Top JCL statements basic rules refresh quickly
- JCL refresher#1: What is JCL