MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Deletion of Datasets

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL)
View previous topic :: View next topic  
Author Message
Siva Kumar Sunku
Beginner


Joined: 17 Aug 2004
Posts: 25
Topics: 14

PostPosted: Tue Aug 17, 2004 8:47 am    Post subject: Deletion of Datasets Reply with quote

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
View user's profile Send private message AIM Address
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12370
Topics: 75
Location: San Jose

PostPosted: Tue Aug 17, 2004 9:40 am    Post subject: Reply with quote

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 - DFSORT Development Team (IBM)
DFSORT is on the Web at:
www.ibm.com/storage/dfsort

www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Siva Kumar Sunku
Beginner


Joined: 17 Aug 2004
Posts: 25
Topics: 14

PostPosted: Thu Oct 14, 2004 11:38 pm    Post subject: Reply with quote

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
View user's profile Send private message AIM Address
Siva Kumar Sunku
Beginner


Joined: 17 Aug 2004
Posts: 25
Topics: 14

PostPosted: Fri Nov 12, 2004 4:16 am    Post subject: Reply with quote

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
View user's profile Send private message AIM Address
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12370
Topics: 75
Location: San Jose

PostPosted: Fri Nov 12, 2004 6:39 am    Post subject: Reply with quote

Siva Kumar Sunku,


Please check this link

http://www.mvsforums.com/helpboards/viewtopic.php?t=3193&highlight=adrdssu

Hope this helps...

Cheers

Kolusu
_________________
Kolusu - DFSORT Development Team (IBM)
DFSORT is on the Web at:
www.ibm.com/storage/dfsort

www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL) All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group