View previous topic :: View next topic |
Author |
Message |
Siva Kumar Sunku Beginner
Joined: 17 Aug 2004 Posts: 25 Topics: 14
|
Posted: Tue Aug 17, 2004 8:47 am Post subject: Deletion of Datasets |
|
|
Is there any way to delete all the datasets of a particular HLQ (These should not have been accessed in recent 30 days)?
Ex:- I want to delete all the datasets of type 'SIVA.**' if last access is before 01-Jul-2004.
Guys do please suggest |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12376 Topics: 75 Location: San Jose
|
Posted: Tue Aug 17, 2004 9:40 am Post subject: |
|
|
Shiva,
Code: |
//STEP0100 EXEC PGM=ADRDSSU
//SYSPRINT DD SYSOUT=*
//PSEUDO DD DUMMY
//SYSIN DD *
DUMP /* COMMAND DUMP */ -
DS(INCL(SIVA.**) /* INCLUDE ALL DSN WITH HLQ */ -
BY((REFDT,LE,*,-30)) /* SELECT IF REFDT LE 30 */ -
OUTDD(PSEUDO) /* OUT DD NAME */ -
DELETE /* DELETE ALL THE DATASETS */
/*
|
Note: The refdt is to be given in julian format. "yy" is year, "ddd" is day of year,"n" is a + - relative digit. (*-1) represents 1 day before the job run date.
Hope this helps...
Cheers
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
|
Siva Kumar Sunku Beginner
Joined: 17 Aug 2004 Posts: 25 Topics: 14
|
Posted: Thu Oct 14, 2004 11:38 pm Post subject: |
|
|
Hi Kolusu,
The following utility is working fine for Datasets on DASD.
This is not deleting the datasets which either reside on Tape or which are migrated. It just deletes the datasets on DASD.
Can you please help what to be done to delete on both DASD and TAPE/Migrated?.
Thanks
Siva. |
|
Back to top |
|
|
Siva Kumar Sunku Beginner
Joined: 17 Aug 2004 Posts: 25 Topics: 14
|
Posted: Fri Nov 12, 2004 4:16 am Post subject: |
|
|
Hi,
I have a requirement to delete the Datasets which are not referenced in recent 90 days. I am using the following JCL to delete the datasets.
Code: |
//STEP0100 EXEC PGM=ADRDSSU
//SYSPRINT DD SYSOUT=*
//PSEUDO DD DUMMY
//SYSIN DD *
DUMP /* COMMAND DUMP */ -
DS(INCL(SIVA.**) /* INCLUDE ALL DSN WITH HLQ */ -
BY((REFDT,LE,*,-90)) /* SELECT IF REFDT LE 30 */ -
OUTDD(PSEUDO) /* OUT DD NAME */ -
DELETE /* DELETE ALL THE DATASETS */
/*
|
This code is not deleting the datasets, if they are migrated.
Our shop is customized, such that if a dataset is not referenced for 10 days, Migrate the dataset to MIGRAT1 and if not referenced in past 50 days Migrate the dataset to MIGRAT2.
So, Whatever the datasets(Not referenced in 90 days), I am trying to delete are migrated to MIGRAT2. Is there any way to delete the datasets in MIGRAT2(If not referenced in last 90 Days)?
PS:- If I want to know the last reference date of a Dataset which is migrated to MIGRAT2, I need to recall it. In that process, Its referenced date is changed to Todays Date. So, I can't recall the datasets and delete.
Please Can any one help me in this regard.
Thanks
Siva |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12376 Topics: 75 Location: San Jose
|
|
Back to top |
|
|
|
|