Operating System - OpenVMS
1748219 Members
4286 Online
108759 Solutions
New Discussion юеВ

utime problem on OpenVMS 7.3.1

 
SOLVED
Go to solution
Tomas Stehlik
Occasional Advisor

utime problem on OpenVMS 7.3.1

utime doesn't change created time of file, even though allow set modified time before it (on both ODS2 and ODS5).

Try it on your system with attached utime_test.

I had found this problem building actual CVS.

VMSMunch from CVS has also the same problem.

When utime_test or CVS is builded with utime from VMS_JACKETS.OLB - PORTING it seems OK.
8 REPLIES 8
Martin P.J. Zinser
Honored Contributor

Re: utime problem on OpenVMS 7.3.1

Hello Thomas,

did you do a

$ SET VOLUME/VOLUME_CHARACTERISTICS=ACCESS_DATES=[delta-time]

as per

http://h71000.www7.hp.com/doc/731FINAL/6657/6657pro_003.html#dcl_accdates

Greetings, Martin

P.S. For passers-by, this is a new feature in 7.3-1, so no need to test this on earlier versions.
Willem Grooters
Honored Contributor

Re: utime problem on OpenVMS 7.3.1

Thomas,

I don't have any real experience in this filed, but this may help:

Reading the VMS_JACKETS release-notes (http://h71000.www7.hp.com/openvms/products/ips/porting_relnotes.html) I think it _might_ be a matter of how the VMS_JACKETS.OLB has been built. It _might_ depend on your VMS version, given this excerpt:

[quote]
ON_RUBY - Use if you are building on an OpenVMS Alpha Version 7.3-1 (or later) system. This is only for building the jackets on a V7.3-1 (or later) system; the run-time will not call functions which are new to V7.3-1 such as symlink.

RUBY_RTL - Causes the jackets, at run-time, to call some of the functions which are new to OpenVMS Alpha Version 7.3-1. Currently only symlink and readlink fall into this category.

[/quote]

be sure also to have the right runtime library as well.

Martin: your suggestions is for ODS-5 only and Thomas signalled this on ODS-2 as well (as he stated in his message...)

Willem
Willem Grooters
OpenVMS Developer & System Manager
Tomas Stehlik
Occasional Advisor

Re: utime problem on OpenVMS 7.3.1

Hi all,

Thanks for tips, but when I use attached utime_test on some file Created time stay unchanged and it can give nonsens results like:

Created > Revised

$utime utime_test.c 0 0
Change times on file utime_test.c to 0 0
Status 0
$
$dir/fu utime_test.c

Directory DISK$EXT3:[USERS.STEHLIK.TMP]

utime_test.c;28 File ID: (1285,8,0)
Size: 2/3 Owner: [CSP_GR,STEHLIK]
Created: 27-OCT-2003 18:00:59.43
Revised: 1-JAN-1970 01:00:00.00 (1)
Expires:
Backup:
Effective:
Recording:
Accessed: 27-OCT-2003 18:01:17.01
Attributes: 1-JAN-1970 01:00:00.00
Modified: 1-JAN-1970 01:00:00.00
Linkcount: 1

Try pls utime with attached utime_test.c on your systems and tell me how it behaves.

I started to debug CVS that on first checkout creates files with actual date and is unable to change Created time to the times like in repository.

Yes PORTING library do it well:

From Release Notes:
utime would fail to set the revision date if it were earlier than the file's creation date. Now if the revision date is earlier than the creation date, the creation date is also set to the specified date.

Why utime from C RTL doesn't also correct creation time?

Tomas
Martin P.J. Zinser
Honored Contributor

Re: utime problem on OpenVMS 7.3.1

How about the following: This is how utime is supposed to behave?

The man page on Linux very clearly states that utime changes modification and access time, but not creation time, and lo and behold, running your program on my Linux laptop produces exactly this result, i.e. ctime is unchanged as does the CRTL.

Greetings, Martin

P.S. For portability reasons try to use instead of
P.P.S Since you seem to be interested in CVS, I should have a first cut of 1.12.1 ready sometime next week.
Tomas Stehlik
Occasional Advisor

Re: utime problem on OpenVMS 7.3.1

Well either utime should do nothing or it should correct by side efect also Created time but allow
Created > Revised ?
I am not sure if it was really intended.

Is there some other way how to change Created time directly instead of this side effect when utime change revised time to past?

Also unzip needs to setup creation time of newly created files to past to preserve the time like in archive.

Will CVS 1.12.1 keep VMS in main stream?
Martin P.J. Zinser
Honored Contributor
Solution

Re: utime problem on OpenVMS 7.3.1

Well, all the old "stuff" is still in the sources and I do intend to submit my changes to the project. If they will be accepted I can not tell yet.
Martin P.J. Zinser
Honored Contributor

Re: utime problem on OpenVMS 7.3.1

P.S. If you are interested in testing CVS before I do submit the stuff to the development group drop me a mail at zinser@zinser.no-ip.info
Vouters
Advisor

Re: utime problem on OpenVMS 7.3.1

From OpenVMS C RTL Manual:
utime function:
NOTES page REF 572
The new behaviour must explicitly enabled by defining the DECC$EFS_FILE_TIMESTAMPS logical name
to "ENABLE" before invoking the application. Setting this logical does not affect the behaviour of stat, fstat,
utime, utimes for files on an ODS-2 device.

So the actual question is: is your volume ODS-2 or ODS-5 formatted ?
Does it help ?
Philippe