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
 

 

Deleting datasets with respect to its creation date

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
tishasha

New User


Joined: 14 Jun 2007
Posts: 5
Location: Manila

PostPosted: Wed Aug 08, 2007 8:07 am    Post subject: Deleting datasets with respect to its creation date
Reply with quote

Hi..

I would like to know how to delete datasets which are, for example, 5 weeks old from the current date.'

Thank you!
Back to top
View user's profile Send private message

balajiofcrrcoe

New User


Joined: 07 Jul 2005
Posts: 41
Location: chennai

PostPosted: Wed Aug 08, 2007 10:57 am    Post subject: Re: Deleting datasets with respect to its creation date
Reply with quote

please check the old post

http://ibmmainframes.com/post-21905.html
Back to top
View user's profile Send private message
tishasha

New User


Joined: 14 Jun 2007
Posts: 5
Location: Manila

PostPosted: Wed Aug 08, 2007 12:11 pm    Post subject: Re: Deleting datasets with respect to its creation date
Reply with quote

hi balajiofcrrcoe..

thank you for the reference.. however, how will I go about the deletion when I only want to delete datasets with name, for example, ABCD.EFGH.I.**
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Wed Aug 08, 2007 3:35 pm    Post subject:
Reply with quote

Are we talking about DASD, Tape, or both types of dataset here ?

Are the DASD datasets guaranteed to be on DASD, or might they be migrated by the ILM software installed ?

Another question, What if the datasets are still being used off and on, or will this not happen. Maybe you could also build in a days since last used factor too, jst to be on the safe side.

Will you require backups to exist before deletion.

How are the candidates for deletion selected.

If ALL of the dataset names have a common factor, like HLQ= or 2LQ= then it would be very easy to ask your storage people to build an SMS MGMTCLAS to do this automatically and which will deal with both DASD and migrated datasets.

And of course, if you also have SMS managed tapes, then they get catered for in the same MGMTCLAS.
Back to top
View user's profile Send private message
tishasha

New User


Joined: 14 Jun 2007
Posts: 5
Location: Manila

PostPosted: Thu Aug 09, 2007 1:46 pm    Post subject: Re: Deleting datasets with respect to its creation date
Reply with quote

Hi Expat..

I'll be creating datasets (on a daily basis) for a certain job whose names are dynamically created, ie., the current date will be concatenated on the last part of the ds name : ABCD.EFG.D070809

1) We'll be using just DASD datasets
2) The datasets can be browsed/used on and off
3) No backups required before deletion
4) Those datasets with ds name: ABCD.EFG.* that have been around for 5 weeks as of the current date should be deleted

Great thanks!
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Thu Aug 09, 2007 2:00 pm    Post subject:
Reply with quote

If they will not get migrated, then you can use DFdss

But - the easiest and surest solution would be to get your storage group to define the correct MGMTCLAS for these datasets, and then sit back and let HSM do all the work.
Back to top
View user's profile Send private message
balajiofcrrcoe

New User


Joined: 07 Jul 2005
Posts: 41
Location: chennai

PostPosted: Thu Aug 09, 2007 6:03 pm    Post subject: Re: Deleting datasets with respect to its creation date
Reply with quote

This is one of the way to resolve the requirement:-

Since the last qualifer is the file creation date,so ABCD.EFG.* will list only
one file with the name ABCD.EFG.D070709 (if we want to get the files created
before to 4 weeks from system date).

So you can code a new cobol pgm which will deduct 4 weeks from system date and
will get the newdate,you can string the strings 'DELETE' 'ABCD.EFG.D' and the
newdate like 'DELETE ABCD.EFG.D+new date' and write it to a parm file, further
you can pass this to the idcams sysin.
Back to top
View user's profile Send private message
balajiofcrrcoe

New User


Joined: 07 Jul 2005
Posts: 41
Location: chennai

PostPosted: Thu Aug 09, 2007 6:06 pm    Post subject: Re: Deleting datasets with respect to its creation date
Reply with quote

This is one of the way to resolve the requirement:-

Since the last qualifer is the file creation date,so ABCD.EFG.* will list only one file with the name ABCD.EFG.D070709 (if we want to get the files created before to 4 weeks from system date).

So you can code a new cobol pgm which will deduct 4 weeks from system date and will get the newdate,you can string the strings 'DELETE' 'ABCD.EFG.D' and the newdate like 'DELETE ABCD.EFG.D+new date' and write it to a parm file, further
you can pass this to the idcams sysin.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Thu Aug 09, 2007 9:49 pm    Post subject:
Reply with quote

balajiofcrrcoe

Why would the OP want to code a COBOL program to do what either his storage people can do in about 5 minutes, or he can do himself in about 10 minutes using Dfdss.

Dfdss has a date capability that allows you to select the current date less any given quantity, like *-35, which funnily enough equates to 5 weeks ago.
Back to top
View user's profile Send private message
balajiofcrrcoe

New User


Joined: 07 Jul 2005
Posts: 41
Location: chennai

PostPosted: Fri Aug 10, 2007 12:00 pm    Post subject:
Reply with quote

You are correct expat,

I said about the other way of doing it.
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 DUMP DATASETS VS TRACE DATASETS! lind sh CICS 4 Tue Dec 06, 2016 11:31 pm
No new posts TOT & DATE parameter in ICEMAN hemanthj642 DFSORT/ICETOOL 4 Mon Nov 14, 2016 5:19 am
This topic is locked: you cannot edit posts or make replies. How to pass the previous month date i... Suganya87 DFSORT/ICETOOL 5 Mon Oct 31, 2016 4:13 pm
This topic is locked: you cannot edit posts or make replies. Get correct date and time when curren... balaji81_k DB2 24 Fri Oct 14, 2016 10:40 pm
No new posts Single COPY CICS TS datasets and when... Kyle Carroll CICS 2 Tue Oct 11, 2016 9:47 pm


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