stern@bnl.ARPA (Eric G. Stern) (02/18/88)
Here are two programs which change modification dates on files. The first sets the date of the file to whatever is stored in the ascii string FUTURE, the second resets the modification date to be the same as the creation date. In both cases, the logical FIXED_FILE must point to the file to fix. They are simple macro programs needing nothing fancy. Just MACRO, LINK, and RUN. There are no comments, but anyone who knows macro will immediately know what's going on. All the information necessary for writing these is in the RMS manuals, and has been unchanged since V2. Note that it is only possible to set the creation date of a file when it is initially created, either by a using an FDL specification, or by setting the XAB$Q_CDT field in the $XABDAT block when the file is $CREATEd. Eric G. Stern stern@bnl.arpa stern@bnl-cl1.arpa 44043::STERN or 22565::STERN stern@cernvm.bitnet ---- First program ---- .psect $code,long,con,lcl,shr,exe,nowrt,pic,rel,rd,usr,novec .entry fixdate,^m<> $open fab=file_fab blbs r0,1$ ret 1$: $bintim_s - timbuf=future,- timadr=futuredate blbs r0,2$ ret 2$: movq futuredate,file_rdt+xab$q_rdt $close fab=file_fab ret .psect $local,long,con,lcl,noshr,noexe,wrt,pic,rel,rd,usr,novec FUTURE: .ASCID /21-JUN-1985 11:56:00.00/ futuredate: .blkq 1 .align 2 file_fab: $fab fnm=<fixed_file>,- fac=<get,put>,- xab=file_rdt file_rdt: $xabrdt .end fixdate ---- Second program ---- .psect $code,long,con,lcl,shr,exe,nowrt,pic,rel,rd,usr,novec .entry fixdate,^m<> $open fab=file_fab blbs r0,1$ ret 1$: 2$: movq file_dat+xab$q_cdt,file_rdt+xab$q_rdt movw #1,file_rdt+xab$w_rvn $close fab=file_fab ret .psect $local,long,con,lcl,noshr,noexe,wrt,pic,rel,rd,usr,novec FUTURE: .ASCID /21-JUN-1985 11:56:00.00/ futuredate: .blkq 1 .align 2 file_fab: $fab fnm=<fixed_file>,- fac=<get,put>,- xab=file_rdt file_rdt: $xabrdt - nxt=file_dat file_dat: $xabdat .end fixdate
scott@stl.stc.co.uk (Mike Scott) (03/08/88)
In article <365@bnl.ARPA> stern@bnl.ARPA (Eric G. Stern) writes: > >Here are two programs which change modification dates on files. The ... >Note that it is only possible to set the creation date of a file when >it is initially created, either by a using an FDL specification, >or by setting the XAB$Q_CDT field in the $XABDAT block when the ... NOT TRUE. The program FILESET which was distibuted recently (or my mod to it, I forget!) can change at any time the creation, revision, backup or expiry date of a file, along with the revision count, file attributes (record type, carriage control, etc) and characteristics (locked/contiguous etc). -- Regards. Mike Scott (scott@stl.stc.co.uk <or> ...uunet!mcvax!ukc!stl!scott) phone +44-279-29531 xtn 3133.