Portal | IBM Manuals | Downloads | Products | Refer | Info | Programs | JCLs | Forum Rules*| Site Map | Mainframe CD 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index
 
Register
 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index FAQ Search 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
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
References
Kevin

Active User


Joined: 25 Aug 2005
Posts: 254

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: 254

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
Display posts from previous:   
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL All times are GMT + 6 Hours
Page 1 of 1