- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- Re: House keeping for file version in Openvms
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-27-2009 08:49 PM
тАО07-27-2009 08:49 PM
House keeping for file version in Openvms
In VMS is it possible to keep the housekeeping for file versions ? As you know in VMS Max. file version is 32767 , after that if we try to create the same file, it won't allow. so we've last option to purge the file and rename file to version 1. So doing this things manually every week, Can we put any script so that once file version reached to "a.txt;32767" then automatically script will purge this file and rename to version 1 as well.
we are using one monitoring tool and it generate the new logs files with same name every 1 hr , I've already kept file housekeeping to Purge/keep=5 a.txt
But this is not enough to fix this issue , Vendor still checking on their script.So by the time is there any way to fix this.
Note:same script is running on HP-UX w/o any issue because no file version limit concept there as in VMS.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-27-2009 10:23 PM
тАО07-27-2009 10:23 PM
Re: House keeping for file version in Openvms
created before I did something.
> Can we put any script [...]
The best place to handle this may be in the
procedure/program which creates the log file,
rather than in some periodic thing which may
not run when you need it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-28-2009 12:41 AM
тАО07-28-2009 12:41 AM
Re: House keeping for file version in Openvms
I prefer to housekeep logfiles by suffixing the file with _YYYYMMDDHHMMSSHH of the creation date of the file.
So OVERNIGHT_BATCH.LOG would become
OVERNIGHT_BATCH.LOG_2008072801012356
Then, if you want to housekeep those files you can use something like:
$ BACKUP/LOG/VER/DEL *.LOG_* /BEFORE="-90-" LOGS.BCK/SAVE
I echo the above that you do not want to let file version numbers get out of control. Anything over a couple of hundred and you want to start having a closer look.
HTH
Craig A
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-28-2009 02:08 AM
тАО07-28-2009 02:08 AM
Re: House keeping for file version in Openvms
Both Steve and Craig have good points.
One can automatically limit the number of retained versions of a file by using SET FILE/VERSION_LIMIT. However, the effect of automatic purging files does have significant dangers with regards to losing data by accident.
One can also explicitly specify a non-zero version number and overwrite the previous file. This is not generally done for the same reason; it can lead to a variety of accidents. Often, the reason for this is that while the application is writing (and re-writing) version 1 of the file, someone accidentally edits the file and saves (rather than quits) the edit, creating version 2.
Caution is strongly advised.
- Bob Gezelter, http://www.rlgsc.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-28-2009 04:49 AM
тАО07-28-2009 04:49 AM
Re: House keeping for file version in Openvms
In your forum profile we can see the following:
I have assigned points to 1 of 140 responses to my questions.
Maybe you will find the time to assign points to those people who helped you solving your problems. This link could help you with assigning points http://forums13.itrc.hp.com/service/forums/helptips.do?#28
Back to your current problem. All the answers from steven, craig and bob are correct. If you still want to use a procedure which solves your problem, then see attached file. It is a subroutine. P1 is the name of the file with the high file version. The Subroutine renames all those files. If you have for example the following files:
x.x;300
x.x;299
x.x;298
and you start the Subroutine wit x.x as P1 then
x.x;298 will be renamed to x.x;1
x.x;299 will be renamed to x.x;2
x.x;300 will be renamed to x.x;3
Hope that helps
Regards
Geni
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-28-2009 02:47 PM
тАО07-28-2009 02:47 PM
Re: House keeping for file version in Openvms
Assuming no interference, the simplest way to reset a range of file versions to a contiguous range starting from 1 is:
$ RENAME sourcename.type;* sourcename.TMP;
$ RENAME sourcename.TMP;* sourcename.type;
(UPPER CASE characters and punctuation all appear exactly as written, lower case characters replaced according to your file name).
This will change some dates dates in the header.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-29-2009 03:50 AM
тАО07-29-2009 03:50 AM
Re: House keeping for file version in Openvms
If you have 32767 log files, that's going to be a log of hunting if you try and find an issue with the job.
You're also likely to be creating a lot of fragmentation on the disk where these files exist if you continually delete files. If you're looking at a physical disk that also contains data files and you're expecting performance, think again (I know this from experience!)
So, potential resolutions:
- set up a script that looks for versions of the file and then renames them, as you're suggesting.
- set up a script that zips the files up into a dated zipfile. If you do this with the move file into zip archive then you won't have lots of files dotted around but you'll still be able to unzip the zip archive if you need to troubleshoot a problem.
- Put rename and purge logic into the start of the script that generates the log file.
- Create the log file on the null device so that it doesn't really create a log file at all?
- Submit a second job from the job creating the log file which deletes the log file after, say, one minute? Rubbish for troubleshooting, though you can always try and do a search for an error status before doing the delete.
Depending upon how quickly the log files are being created, you might always try something as simple as:
$ PURGE LOGFILE.LOG/KEEP=3
$ RENAME LOGFILE.LOG;-2 LOGFILE.LOG;1
$ RENAME LOGFILE.LOG;-1 LOGFILE.LOG;2
$ RENAME LOGFILE.LOG; LOGFILE.LOG;3
Steve
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-29-2009 10:57 PM
тАО07-29-2009 10:57 PM
Re: House keeping for file version in Openvms
As there is weekly reboot of servers (business requirement),i will put below options in system startup script as suggested by Steven.
$ PURGE LOGFILE.LOG/KEEP=3
$ RENAME LOGFILE.LOG;-2 LOGFILE.LOG;1
$ RENAME LOGFILE.LOG;-1 LOGFILE.LOG;2
$ RENAME LOGFILE.LOG; LOGFILE.LOG;3
Warm regards,
Shiva
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-31-2009 11:28 PM
тАО07-31-2009 11:28 PM
Re: House keeping for file version in Openvms
You'll also need to issue the commands at a time when the log file isn't open - otherwise VMS won't let you rename the file!
Steve
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-01-2009 01:49 AM
тАО08-01-2009 01:49 AM
Re: House keeping for file version in Openvms
>You'll also need to issue the commands at a >time when the log file isn't open - >otherwise VMS won't let you rename the file!
I think RENAME is possible, just certain other operations aren't.
Craig A