- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- Re: SET FILE/ATTR=REVDATE doesn't work?
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
Discussions
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
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
02-12-2013 04:11 PM
02-12-2013 04:11 PM
SET FILE/ATTR=REVDATE does not appear to work. The REVDATE ends up as the current date/time. It might be that the REVDATE is correctly set but then because the file was just modified, REVDATE is set again - thereby making the command pointless.
Is this just me?
Environment is Itanium, V8.4, ODS-2
NB: Changing to ODS-5 is *not* an option.
There appears to be an undocument /[NO]RECORD qualifier but it doesn't seem to make any difference.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-12-2013 08:27 PM
02-12-2013 08:27 PM
Re: SET FILE/ATTR=REVDATE doesn't work?
> Is this just me?
No. Same behavior on my "COMPAQ Professional Workstation XP1000
running OpenVMS V8.3". I know nothing, but I suspect that your analysis
is correct. <fabdef.h> mentions FIB$M_NORECORD and fib$v_norecord,
which can be used to access the magic bit. (It's used in Info-ZIP UnZip
[.vms]vms.c:stamp_file().)
> NB: Changing to ODS-5 is *not* an option.
It looks to me as if it wouldn't actually help, either.
> There appears to be an undocument /[NO]RECORD qualifier but it doesn't
> seem to make any difference.
Perhaps when someone gets it to work, it'll be documented.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-12-2013 08:58 PM
02-12-2013 08:58 PM
Re: SET FILE/ATTR=REVDATE doesn't work?
Pretty dumb huh? I seem to recall someone even defending the behaviour.
Anyway.. Macro and Cobol workarounds by yours truly in answers to comp.os.vms topic "manually resetting file revision dates"
https://groups.google.com/d/topic/comp.os.vms/RPIayAr6Vm0/discussion
C workaround below.
Hein.
#include descrip #include stdio #include RMS main(int argc, char *argv[]) { struct FAB fab = cc$rms_fab; struct XABRDT dat = cc$rms_xabrdt; int stat; int date_dx[2]; if (argc < 3) { printf ("Usage: %s <file-name> <revision-date>\n", argv[0]); return 1; } date_dx[0] = strlen (argv[2]); date_dx[1] = (int) argv[2]; fab.fab$l_fna = argv[1]; fab.fab$b_fns = strlen(fab.fab$l_fna); fab.fab$b_fac = FAB$M_PUT; fab.fab$l_xab = &dat; stat = sys$open ( &fab ); if (stat & 1) stat = sys$bintim ( date_dx, &dat.xab$q_rdt); if (stat & 1) stat = sys$close ( &fab ); return stat; }
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-13-2013 12:45 AM
02-13-2013 12:45 AM
Re: SET FILE/ATTR=REVDATE doesn't work?
>> NB: Changing to ODS-5 is *not* an option.
>
> It looks to me as if it wouldn't actually help, either.
Right, but it is different:
$ del x.x;*
$ copy nl: x.x
$ pipe dir/full x.x |search sys$pipe "Created:"/wind=(0,8)
Created: 13-FEB-2013 09:36:25.07
Revised: 13-FEB-2013 09:36:25.07 (1)
Expires: <None specified>
Backup: <No backup recorded>
Effective: <None specified>
Recording: <None specified>
Accessed: <None specified>
Attributes: <None specified>
Modified: <None specified>
$ set file/att=revdate="11-FEB-2011 11:11:11.11" x.x
$ pipe dir/full x.x |search sys$pipe "Created:"/wind=(0,8)
Created: 13-FEB-2013 09:36:25.07
Revised: 13-FEB-2013 09:36:39.30 (2)
Expires: <None specified>
Backup: <No backup recorded>
Effective: <None specified>
Recording: <None specified>
Accessed: <None specified>
Attributes: <None specified>
Modified: <None specified>
$ set file/att=attdate="11-FEB-2011 11:11:11.11" x.x
$ pipe dir/full x.x |search sys$pipe "Created:"/wind=(0,8)
Created: 13-FEB-2013 09:36:25.07
Revised: 11-FEB-2011 11:11:11.11 (2)
Expires: <None specified>
Backup: <No backup recorded>
Effective: <None specified>
Recording: <None specified>
Accessed: <None specified>
Attributes: <None specified>
Modified: <None specified>
$
$ del x.x;*
$ copy nl: x.x
$ pipe dump /header x.x |search sys$pipe " date:","revision number:"
Revision number: 1
Creation date: 13-FEB-2013 09:42:11.05
Revision date: 13-FEB-2013 09:42:11.05
Expiration date: <none specified>
Backup date: <none specified>
Last access date: 13-FEB-2013 09:42:11.05
Last attribute change date: 13-FEB-2013 09:42:11.05
$ set file/att=revdate="11-FEB-2011 11:11:11.11" x.x
$ pipe dump /header x.x |search sys$pipe " date:","revision number:"
Revision number: 2
Creation date: 13-FEB-2013 09:42:11.05
Revision date: 11-FEB-2011 11:11:11.11
Expiration date: <none specified>
Backup date: <none specified>
Last access date: 13-FEB-2013 09:42:11.05
Last attribute change date: 13-FEB-2013 09:42:34.78
$ set file/att=attdate="11-FEB-2011 11:11:11.11" x.x
$ pipe dump /header x.x |search sys$pipe " date:","revision number:"
Revision number: 2
Creation date: 13-FEB-2013 09:42:11.05
Revision date: 11-FEB-2011 11:11:11.11
Expiration date: <none specified>
Backup date: <none specified>
Last access date: 13-FEB-2013 09:42:11.05
Last attribute change date: 11-FEB-2011 11:11:11.11
$
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-13-2013 12:34 PM
02-13-2013 12:34 PM
Re: SET FILE/ATTR=REVDATE doesn't work?
See Joe Meadows' FILE utility for an example of how to do it by setting up a $QIO that updates the FIB after setting fib$l_acctl to FIB$M_NORECORD in order to keep your update from being recorded.
Or be lazy (like me) and use Perl:
$ perl -e "utime undef,undef,$ARGV[0];" x.x
or if you envision being lazy in exactly the same way on a regular basis, set up a symbol and use that:
$ touch :== "''perl' -e ""utime undef,undef,$ARGV[0];""" $ touch x.x
or for VMS versions later than 7.3, you can probably use the CRTL's utime() in your own program.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-13-2013 01:24 PM