[comp.os.vms] Setting file time from VMS

dhesi@bsu-cs.UUCP (Rahul Dhesi) (02/09/88)

Does anybody have a C function that will set creation and/or
modification time for a file?
-- 
Rahul Dhesi         UUCP:  <backbones>!{iuvax,pur-ee,uunet}!bsu-cs!dhesi

rrk@byuvax.bitnet (02/10/88)

There are many ways to do this:

You can do it at the DCL level, at the RMS level, or at the QIO level.
I think that the QIO level is the only way to modify dates of an existing
file, although I'm not sure.  I don't have my RMS and IO reference manuals
in front of me.  I remember once successfully setting creation date from
DCL as follows:

Use ANALYZE/RMS/FDL type command to produce FDL description of file, or
simply write one using EDIT/FDL.  Then EDIT/FDL to make the creation date
whatever you want.  Then do a CONVERT/FDL from the original file to a
destination file, which will be created with the desired creation date.
The problem with doing the modification date this way is that RMS, unless
I am mistaken, automatically updates the modification date every time you
deaccess a file which has been open for modification, so your desired
modification date would be destroyed by it's own modification.

I believe if you set up your own FIB blocks and do a write header attributes
(see I/O reference manual on what to do after you do an RMS open specifying
UFO in the FOP and getting the channel back in stv) you can set either date
to whatever you want.

ERIC@UOFT02.BITNET (Eric) (02/16/88)

In-Reply-To:  your letter rec'd 14-FEB-1988 16:04

From:   IN%"INFO-VAX@KL.SRI.COM" 14-FEB-1988 16:04
To:     Eric Rostetter <ERIC@UOFT02>
Subj:   RE: Setting file time from VMS

> Does anybody have a C function that will set creation and/or
> modification time for a file?

The is such a routine in the program FILE.C recently sent over info-vax. The
program was sent by Joe Meadows Jr., Fred Hutchinson Cancer Research Center,
bitnet - JOE@FHCRCVAX, arpa - JOE%FHCRCVAX.BITNET@WISCVM.WISC.EDU,  or voice
(206) 467-4970.

Eric Rostetter
Eric @ uoft02.bitnet