This was created for me and it works fine if the @ACS.PTRM.QUERY dataset already exists. However, if the dataset was previously deleted, the jcl abends as dataset not found. I've tried different parameters for DISP and can't figure out the correct code.
I've keep researching and researching this issue and cannot figure it out. Please help. Thank you
If the dataset exists, delete it and fill it with the data from the run.
If the dataset does not exist, create it and fill it with the data from the run.
000005 //DELFIL1 EXEC PGM=IEFBR14,COND=(0,NE)
000006 //DD01 DD DSN=@ACS.PTRM.QUERY,DISP=(OLD,DELETE,DELETE)
//A EXEC PGM=IEFBR14
//THEDS DD DISP=(MOD,DELETE),UNIT=SYSALLDA,SPACE=(TRK,0),
// DSN=thedsn