Delete datasets of a particular HLQ?
Posted: Mon Dec 29, 2014 4:42 pm
Hi,
I had a requirement in which I wanted to delete all the datasets starting with a given HLQ. Actually these datasets are not referenced in last 45 days. To do that I used the beow JCL:
This code works but this is not deleting the datasets which either reside on Tape or which are migrated. It just deletes the datasets on DASD. What can I do to overcome from this? Thanks for any help on this.
I had a requirement in which I wanted to delete all the datasets starting with a given HLQ. Actually these datasets are not referenced in last 45 days. To do that I used the beow JCL:
Code: Select all
//STEP010 EXEC PGM=ADRDSSU
//SYSPRINT DD SYSOUT=*
//DUMMYDD DD DUMMY
//SYSIN DD *
DUMP /* COMMAND DUMP */ -
DS(INCL(HLQ.**) /* INCLUDE ALL DSN WITH HLQ */ -
BY((REFDT,LE,*,-45)) /* SELECT IF REFDT LE 45 */ -
OUTDD(DUMMYDD) /* OUT DD NAME */ -
DELETE /* DELETE ALL THE DATASETS */
/*