gokulNmf wrote:... Case2. check whether &&incl, in this case it will be a temporary dataset. As the disp parameter is pass, there is a possibility of it being a temporary dataset.
DISP=(...,PASS) does not necessarily mean the dataset is a "temporary" dataset. Consider this JCL.
//A EXEC PGM=IEBGENER
//SYSPRINT DD SYSOUT=*
//SYSUT1 DD *
Data to copy to SYSUT2
//SYSUT2 DD DISP=(NEW,PASS),UNIT=SYSDA,
//SYSIN DD DUMMY
//B EXEC PGM=IEFBR14
//KEEPIT DD DISP=(OLD,CATLG),DSN=XX.YY
The SYSUT2 dataset in step A is not a temporary dataset, but it is "passed" to step B to catalog it. If step B is not run because step A abnormally terminates, XX.YY is deleted at the end of the job because its initial allocation (DISP=(NEW,...)) implies the dataset is to be deleted.