[comp.os.vms] Expiration dates - Retention

x_haraldsen%use.uio.uninett@TOR.NTA.NO (Tore Haraldsen USE/UiO) (04/30/87)

>From:    "John H. Yates" <YATES%a.chem.upenn.edu@cis.upenn.edu>
>Posted-Date: Mon, 27 Apr 87 22:08 EST
>X-Vms-To: INFOVAX,YATES

> Is there any way to retrieve the last accessed date for files? I know
>last revised is available, but haven't found if RMS keeps the last
>time a file was simply read.
> I at one time considered archiving user files that had not been accessed
>in n days, but gave up when the hook did not seem to exist.
> I know it would slow down i/o and for this reason may not be available,
>and yes, I know users could easily beat the archive system, by copying
>their files to nl: , etc. , but what they don't know will help me free up
>disk space.

You can get last-accessed-date by setting retention on the disk volume
(see System Manager Ref. Manual):
	$ SET VOLUME volnam/RETENTION=(min[,max])

where min and max specifies the minimum and maximum retention times to
be used by the file system to determine the expiration date for files
on the volume.

When a file is created on the volume, the expiration date is initially
set to current time + max. Each time the file is accessed, the current
time is added to the min time, and if this sum is greater than the exp-
iration date, a new expiration date is computed.

If you omit the max value, a default value that is the smaller of (2 x
min) or (min + 7) days is used. For exmple, /Retention= 3- is the same
as /Retention=(3-,6-), while /Retention=10- is the same as /Retention=
(10-,17-).

The above is quoted from $ HELP SET VOLUME /RETENTION. It works.