If a passed data set is never received by a later step, at the end of the job the system processes the data set as an unreceived, passed data set. This can result in unintentionally deleting the data set, even if it had been cataloged during the job, as the following example shows.
EXAMPLE:
//Step1 EXEC PGM=pgmname1
//DD1 DD DSN=dsname,DISP=(NEW,CATLG,DELETE)
//*
//Step2 EXEC PGM=pgmname2
//DD2 DD DSN=dsname,DISP=(OLD,PASS,DELETE)
//*
//Step3 EXEC PGM=pgmname3
//Step4 EXEC PGM=pgmname4
//DD4 DD DSN=dsname,DISP=(OLD,PASS,DELETE)
Data set “dsname” is cataloged when Step1 ends. After Step2 ends, “dsname” is still cataloged. If Step3 terminates abnormally, “dsname” will be deleted during end of job processing, because it had been passed by Step2 and not received by a following step, AND the abnormal disposition for Step2 was DELETE.
//Step1 EXEC PGM=pgmname1
//DD1 DD DSN=dsname,DISP=(NEW,CATLG,DELETE)
//*
//Step2 EXEC PGM=pgmname2
//DD2 DD DSN=dsname,DISP=(OLD,KEEP,DELETE)
//*
//Step3 EXEC PGM=pgmname3
//Step4 EXEC PGM=pgmname4
//DD4 DD DSN=dsname,DISP=(OLD,KEEP,DELETE)