View previous topic :: View next topic
|
Author |
Message |
Grant Goodale
New User
Joined: 13 Nov 2010 Posts: 67 Location: Brampton, Ontario, Canada
|
|
|
|
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 |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10872 Location: italy
|
|
|
|
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 |
|
|
Grant Goodale
New User
Joined: 13 Nov 2010 Posts: 67 Location: Brampton, Ontario, Canada
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
How do you plan to "delete" these datasets? |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
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. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
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 |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
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 |
|
|
Grant Goodale
New User
Joined: 13 Nov 2010 Posts: 67 Location: Brampton, Ontario, Canada
|
|
|
|
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 |
|
|
|