- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- Re: No new file versions on lib$rename_file
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
тАО05-07-2007 02:55 AM
тАО05-07-2007 02:55 AM
I have a program written in Fortran and there I rename a temporary file into a new_file.ext. with lib$rename_file. Every time I'm renaming the file a new file version of the new_file.ext is generated, so far so good.
How can I prevent generating new versions? At the moment I delete the file version ;-1 at then end of the program, but at the end of the day I ve got a file version about several hundreds.
Thanks for any help or tip....
Dario
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-07-2007 03:04 AM
тАО05-07-2007 03:04 AM
SolutionOpenVMS does not do the 'implied' delete like Unix/Windoze would. So you can not create two file with the same name and version number in the same directory.
The easiest would be to just deleted the old temp file before renaming/creating the new file. But I guess you want to keep the old file around 'just in case' as long as possible?
How about
rename new_file.ext;* old_file.ext
rename temp new_file.ext;1
all is well? delete old_file.ext.*
Rename is cheap. On more will not hurt.
How about renaming the old new_file even before the creation of the temp file?
Then you could create the temp file directly with the target name 'new_file'
Finally, what's the problem with a version number in the hundreds? The limit is 65K.
As long as you rename well before getting there it is just a number and can give you a nice little hint as to how often the process has been used.
Cheers,
Hein.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-07-2007 03:06 AM
тАО05-07-2007 03:06 AM
Re: No new file versions on lib$rename_file
several ways to do it.
- $ SET DIREC/VERSION_LIMIT =
Note that this WILL apply to all files going into that directory.
- after you created the first instance of the file:
$ SET FILE/VERSION=
I am not sufficiently fluent :-( in Fortran, but I would expect there to be a construct to achieve the version limit from within the language as well, or as a param to lib$rename_file; others may have more pertinent info on that.
hth
Proost.
Have one on me.
jpe
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-07-2007 03:13 AM
тАО05-07-2007 03:13 AM
Re: No new file versions on lib$rename_file
it is really not often that I can catch you in an (however minor) RMS msitake!
>>>
Finally, what's the problem with a version number in the hundreds? The limit is 65K.
<<<
Well, my experience does not go further than V7.3-2, but here it is MOST DEFINITELY 32K - 1 ( = 32767) !!
(just for grinns)
Proost.
Have one on me.
jpe
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-07-2007 03:27 AM
тАО05-07-2007 03:27 AM
Re: No new file versions on lib$rename_file
It just _should_ be 64K = 65535.
The negative numbers are of course used for relative numbering, but that's just a parsing thing. Best I can tell the 16 bits on disk, in directory, storage of the version numbers could just as well be interpreted as an unsigned short.
Jan, how does your suggestion solve the problem?
If I read Dario's entry correctly then the program allready takes care of removing the excess files. The concern appears to be the high version number, not the number of versions. Admittedly a version limit as you suggested would probably make the program simpler.
Groetjes,
Hein.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-07-2007 06:30 AM
тАО05-07-2007 06:30 AM
Re: No new file versions on lib$rename_file
>>>
At the moment I delete the file version ;-1
<<, & >>>
If I read Dario's entry correctly then the program allready takes care of removing the excess files.
<<<
Yeah, I missed the ;-1 bit.
So my answer really is not an answer to the original problem.
But that makes Hein's statement
>>>
Finally, what's the problem with a version number in the hundreds? The limit is..
<<<
all the more valid. Wether 32 or 64 K, yyou still need in the order ot 100-ish sessions before reaching the limit.
And if (better: nearly), then one simple rename cures all.
A Dutch proverb more or less translates as:
"The foam is not worth the coals used"
fwiw
Proost.
Have one on me.
jpe
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-07-2007 06:53 AM
тАО05-07-2007 06:53 AM
Re: No new file versions on lib$rename_file
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-07-2007 06:07 PM
тАО05-07-2007 06:07 PM
Re: No new file versions on lib$rename_file
Thank you for your answers.
jep, the problem is not the amount of files, but the high file version.
I ll try with the renaming you suggested.
thanks a lot guys.