From:	CSBVAX::MRGATE!info-vax-request@kl.sri.com@SMTP 26-FEB-1988 22:07
To:	ARISIA::EVERHART
Subj:	File modification dates


Received: from ucbvax.Berkeley.EDU by KL.SRI.COM with TCP; Sun 21 Feb 88 16:06:35-PST
Received: by ucbvax.Berkeley.EDU (5.58/1.26)
	id AA08322; Sun, 21 Feb 88 13:36:45 PST
Received: from USENET by ucbvax.Berkeley.EDU with netnews
	for info-vax@kl.sri.com (info-vax@kl.sri.com)
	(contact usenet@ucbvax.Berkeley.EDU if you have questions)
Date: 18 Feb 88 12:22:24 GMT
From: linus!philabs!sbcs!bnl!stern@husc6.harvard.edu  (Eric G. Stern)
Organization: Living in exile in France
Subject: File modification dates
Message-Id: <365@bnl.ARPA>
Sender: info-vax-request@kl.sri.com
To: info-vax@kl.sri.com


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
