Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Delete datasets based on high level qualifiers

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: Delete datasets based on high level qualifiers
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    Post subject: Re: Delete datasets based on high level qualifiers
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:

http://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    Post subject: Re: Delete datasets based on high level qualifiers
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    Post subject: Re: Delete datasets based on high level qualifiers
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    Post subject: Re: Delete datasets based on high level qualifiers
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Group Data based on a key Arun Raj DFSORT/ICETOOL 7 Thu Apr 27, 2017 11:29 pm
This topic is locked: you cannot edit posts or make replies. SDSF multiple spool datasets extracte... PJAlarcon CLIST & REXX 1 Fri Apr 21, 2017 10:50 pm
No new posts Edit large number of datasets (QSAM) zh_lad TSO/ISPF 3 Tue Apr 04, 2017 6:08 pm
No new posts JCL to Set Return code based on DB2 S... vinu78 DB2 17 Mon Mar 13, 2017 9:47 pm
No new posts Inserting records based on conditions vickey_dw DFSORT/ICETOOL 9 Wed Feb 22, 2017 1:33 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us