IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Delete datasets based on high level qualifiers


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
BUBLOO

New User


Joined: 04 Oct 2005
Posts: 3

PostPosted: Tue Oct 04, 2005 3:05 am
Reply with quote

The requirement is to delete certain datasets ( say all datasets with <USERID.DELETE> qualifer) which are more than X days OLD ( say 30 days ) ..

In short delete the datasets with <USERID.DELETE> qualifer which are more than 30 days old using batch job..

Is there any JCL utility available for this or any other alternative .. pls let me know ..


Bubloo.
Back to top
View user's profile Send private message
Kevin

Active User


Joined: 25 Aug 2005
Posts: 234

PostPosted: Wed Oct 12, 2005 5:43 pm
Reply with quote

The answer to this seems to lie within the ADRDSSU utility. This is a powerful utility for managing storage, so be very careful when using it.

For your particular issue, this looks like it would work:

Code:

//STEP0001 EXEC  PGM=ADRDSSU,PARM='TYPRUN=NORUN'           
//SYSPRINT DD    SYSOUT=*                                   
//JUNK      DD   DUMMY                                     
//SYSIN    DD    *                                         
  DUMP DATASET(INCLUDE(HLQ.**) -                       
    BY((CREDT,LT,*,-30))) -                                 
    OUTDD(JUNK) DELETE                                             
/*                                                         
//                                                         


Run it with the 'TYPRUN=NORUN' parm enabled first to make sure that it is doing what you want. If everything looks good, then remove the parm and run it once more, and the datasets should be deleted. From what I've read in other posts concerning this utility, it will work with datasets that are on DASD, not those that are on tape or that have been archived.

I'm not a storage expert, so I'm not intimately familiar with this utility. For more information, check the manual:

publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/DGT2R230/CCONTENTS?DT=20040624152404
Back to top
View user's profile Send private message
BUBLOO

New User


Joined: 04 Oct 2005
Posts: 3

PostPosted: Sat Oct 15, 2005 3:51 am
Reply with quote

Thanks Kevin.. Will check the utility per your advice..

Bubloo
Back to top
View user's profile Send private message
BUBLOO

New User


Joined: 04 Oct 2005
Posts: 3

PostPosted: Thu Oct 20, 2005 5:49 am
Reply with quote

Could any one let me know if there are any alternatives for achieving this ?
Back to top
View user's profile Send private message
Kevin

Active User


Joined: 25 Aug 2005
Posts: 234

PostPosted: Fri Oct 21, 2005 3:29 pm
Reply with quote

BUBLOO wrote:
Could any one let me know if there are any alternatives for achieving this ?


Yes. Execute the IDCAMS program, using the LISTCAT function to list all of the datasets cataloged for the indicated high-level qualifier:

LISTCAT LVL(HLQ) ALL

This will give you a listing of the datasets and, amongst other information, their creation date.

Run the LISTCAT output through a program/utility to extract just the dataset names and their respective creation dates.

Now, run that output through a program/utility to determine which dates are over 30 days old, and generate the appropriate IDCAMS DELETE statements for those datasets.

Execute the IDCAMS program once more, using the list of DELETE statements from the previous step.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts DELETE SPUFI DB2 1
No new posts DSNTIAUL driven delete IBM Tools 0
No new posts How to load to DB2 with column level ... DB2 6
No new posts How to delete a user's alias from the... JCL & VSAM 11
No new posts ISRSUPC search utility - using high l... TSO/ISPF 2
Search our Forums:

Back to Top