Here is my Question on IEBGENER in JCL. For your reference, I have given question and answer.
How to delete an input dataset using IEBGENER utility
In the input file, give DISP= (OLD,DELETE). For output file, give DD DUMMY. After executing the JOB with IEBGENER utility, the input file will be deleted successfully.
// EXEC PGM=IEBGENER
// DD DSNAME=TEST.INPUT
// DISP=(OLD,DELETE)
//*
// DD DUMMY
//*
Related
JCL Complex Interview Questions
Here is a set of interview questions.