VMS question

From: Andreas Freiherr <Andreas.Freiherr_at_Vishay.com>
Date: Wed Aug 7 04:20:05 2002

In fact, opening a file in "append" mode will not create a new version,
but add information to the *end* of the existing file without moving
existing data around, as with any other operating system. This would be
the right way to update a .LOG file.

Opening a file for "write" access will also use the existing file, but
will leave you positioned at the *start* of the file. For sequential
files (as opposed to index-sequential), this will result in the existing
file getting truncated to zero length, and contents replaced with what
the program writes from the beginning.

If you "create" a file, however, the old version will stay in place, and
a new file (with the next higher version number) will be started. That's
what most standard utilities do to output their results, e.g., that's
what a VMS editor will do when you EXIT.

Andreas

Eric Dittman wrote:
>
> > VMS has a distinctive that when you open a file for write or append, a copy
> > of that file is made with a higher "Version" number.
> >
> > What happens then if you have a "log" type file, the OS (or some application)
> > open it from time to time to add info.
> >
> > Mass copies of this file?
>
> You can open, update, and close an existing file without
> creating a new version, if that's what you want.
> --
> Eric Dittman
> dittman_at_dittman.net
> Check out the DEC Enthusiasts Club at http://www.dittman.net/

--
Andreas Freiherr
Vishay Semiconductor GmbH, Heilbronn, Germany
http://www.vishay.com
Received on Wed Aug 07 2002 - 04:20:05 BST

This archive was generated by hypermail 2.3.0 : Fri Oct 10 2014 - 23:34:36 BST