I'm trying to delete some old unused datasets. But I end up in touching the cataloged dataset.
For eg: I'm trying to delete SYS1.BRODCAST which is old, and not cataloged. When I try to delete it using IEHPROGM it ends with error as its trying to scratch the dataset that is allocated to the SYSRES. Below is the JCL i tried for doing it.
//STEP1 EXEC PGM=IEHPROGM
//SYSPRINT DD SYSOUT=*
//DD1 DD DISP=OLD,VOL=SER=XXXXX,UNIT=3390
//SYSIN DD *
SCRATCH DSNAME=dsn,VOL=3390=xxxxx,PURGE
//SYSPRINT DD SYSOUT=*
//DD1 DD DISP=OLD,VOL=SER=XXXXX,UNIT=3390
//SYSIN DD *
SCRATCH DSNAME=dsn,VOL=3390=xxxxx,PURGE
Can someone please let me know why its not hitting the proper dataset instead its touching the live one? Or is there a way to delete datasets of this type?
Any help will be much appreciated.
Thanks,
Viswa..