I'm trying to create and delete a dataset with a JCL symbol in the dataset name this way:
// SET DATE=20110809
//* DELETE DATASET
//DEL01 EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
DELETE DATASET.TEMP.&DATE PURGE
SET MAXCC = 0
//* CREATE DATASET
//STEP01 EXEC PGM=IEFBR14
//DELDD DD DSN=DATASET.TEMP.&DATE,
// DISP=(NEW,CATLG,DELETE)
The problem is that I can not use a JCL symbol within a instream (SYSIN DD *). I can't be sure if the dataset already exists so I can not just use DISP=(MOD,DELETE,DELETE). Is there another way to delete the data set?