IBM Mainframe Forum Index
 
Register
 
IBM Mainframe Forum Index Mainframe: Search Log in to check your private messages Log in
 

Tape dataset information


 
IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
View previous topic :: :: View next topic  
Author Message
Grant Goodale

New User


Joined: 13 Nov 2010
Posts: 55
Location: Brampton, Ontario, Canada

PostPosted: Thu Apr 25, 2013 10:14 pm
Reply with quote

As a part of a cost reduction program, I need to create a REXX EXEC that deletes all tape datasets that have not been referenced in a given period. There are other criteria as well but they are not relevant for thsi discussion.

In my REXX exec, I am given the dataset name. I do a LISTDSI with the parameters "NODIRECTORY NORECALL NOSMSINFO".

This gives me a return code of 16 and a reason code of 8 (tape dataset). When this happens, the SYSREFDATE and SYSCREATE variables are set to null.

I have looked in DCOLLECT output but, since it is not SMS managed, it has no information there. I have also looked at IDCAMS LISTC output. I can find the creration date but no last referenced date.

Does anyone have any ideas for getting this last referenced date or am I out of luck?

TIA
Back to top
View user's profile Send private message
enrico-sorichetti

Senior Member


Joined: 14 Mar 2007
Posts: 10695
Location: italy

PostPosted: Thu Apr 25, 2013 10:18 pm
Reply with quote

Quote:
Does anyone have any ideas for getting this last referenced date or am I out of luck?


from Your tape management system ???
Back to top
View user's profile Send private message
Grant Goodale

New User


Joined: 13 Nov 2010
Posts: 55
Location: Brampton, Ontario, Canada

PostPosted: Thu Apr 25, 2013 10:58 pm
Reply with quote

Thanks, Enrico.

It turns out that these datasets are backups so the creation date is adequate for a deletion criteria. This creation date is available on the IDCAMS LISTC output.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19251
Location: Inside the Matrix

PostPosted: Fri Apr 26, 2013 6:42 am
Reply with quote

Hello,

How do you plan to "delete" these datasets?
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6251
Location: Mumbai, India

PostPosted: Fri Apr 26, 2013 11:24 am
Reply with quote

Quote:
I do a LISTDSI with the parameters "NODIRECTORY NORECALL NOSMSINFO".

This gives me a return code of 16 and a reason code of 8 (tape dataset). When this happens, the SYSREFDATE and SYSCREATE variables are set to null.
IBM's REXX reference states that you can't use LISTDSI to retrieve tape information. So I'd follow the advice from Enrico.

OTOH, Dick brings in a very interesting point and I'm eager to listen the response. icon_smile.gif
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8794
Location: Welsh Wales

PostPosted: Fri Apr 26, 2013 12:00 pm
Reply with quote

Maybe I'm missing something here, but surely this is a wheel reinvention exercise as the TMS would be able to achieve this automatically with the correct parameters defined.

Also, as Dick has mentioned, HOW. You may be lucky that each and every tape is under CATALOG control within the TMS, but what if the retention is controlled by other criteria, such as explicit retention, cycle retention, DL-used retention ? That would mean both a catalog entry deletion AND maintainence of the TMS.

At least by letting the TMS do the work automatically it will also take care of any catalog entries during the scratch cycle processing.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8568
Location: Dubuque, Iowa, USA

PostPosted: Fri Apr 26, 2013 4:05 pm
Reply with quote

Quote:
I need to create a REXX EXEC that deletes all tape datasets that have not been referenced in a given period.
I question the very basic premise of whether or not this SHOULD be done. If the tape datasets are annual backups of financial data that are required to be kept for 7 years by the auditors, getting rid of them before the 7 years is over is a VERY BAD idea -- no matter if it has been 6 years since the backup was last referenced.
Back to top
View user's profile Send private message
Grant Goodale

New User


Joined: 13 Nov 2010
Posts: 55
Location: Brampton, Ontario, Canada

PostPosted: Fri Apr 26, 2013 6:30 pm
Reply with quote

Robert -

The code already has provision for specification of mandatory legal age requirements. I am doing this for a large financial institution so that is always in mind.

expat -

I believe that the TMS in use here is RMM. My department is far removed from the systems side of the house. We are not really reinventing the wheel. We are just making the wheel a little easier to use.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic All times are GMT + 6 Hours
Forum Index -> CLIST & REXX
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Forum Replies
This topic is locked: you cannot edit posts or make replies. Control-M Information. CLIST & REXX 1
No new posts how to read accounting information in... COBOL Programming 1
No new posts Fetch the Dataset names from inside m... TSO/ISPF 18
No new posts what is the DSORG(Datset orgnisation)... JCL & VSAM 8
No new posts IEBGENER is not Creating Member in PD... JCL & VSAM 7

Back to Top