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
 

 

Tape dataset information

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
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    Post subject: Tape dataset information
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Thu Apr 25, 2013 10:18 pm    Post subject: Reply to: Tape dataset information
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    Post subject:
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

Site Director


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

PostPosted: Fri Apr 26, 2013 6:42 am    Post subject:
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: 6258
Location: Mumbai, India

PostPosted: Fri Apr 26, 2013 11:24 am    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Fri Apr 26, 2013 12:00 pm    Post subject:
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: 7905
Location: Bellevue, IA

PostPosted: Fri Apr 26, 2013 4:05 pm    Post subject:
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts FTP - JCL failed while passing FTP co... Suneetha1612 JCL & VSAM 12 Wed Nov 16, 2016 7:33 pm
No new posts To trim spaces in a pipe delimited da... Nish84 COBOL Programming 16 Mon Oct 10, 2016 1:54 pm
No new posts Obtaining file information pahiker COBOL Programming 25 Tue Sep 27, 2016 7:25 pm
No new posts Allocate dataset withour BLKSIZE Susanta CLIST & REXX 2 Thu Sep 22, 2016 11:51 am
No new posts stacking files on a tape Pedro JCL & VSAM 7 Wed Aug 17, 2016 11:11 pm


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