From: CSBVAX::CSBVAX::MRGATE::"SMTP::CRVAX.SRI.COM::RELAY-INFO-VAX" 20-NOV-1988 14:07 To: MRGATE::"ARISIA::EVERHART" Subj: re: File expiration dates Received: From KL.SRI.COM by CRVAX.SRI.COM with TCP; Sun, 20 NOV 88 10:38:43 PDT Received: from Venus.YCC.Yale.Edu by KL.SRI.COM with TCP; Sun, 20 Nov 88 09:59:07 PST Date: Sun, 20 Nov 88 12:46 EST From: "Jerry Leichter (LEICHTER-JERRY@CS.YALE.EDU)" Subject: re: File expiration dates To: PJS@naif.JPL.NASA.GOV, INFO-VAX@KL.SRI.COM X-VMS-To: IN%"PJS@naif.JPL.NASA.GOV",INFOVAX Recently looked into setting file expiration dates, but they don't do what I wanted them to (had wanted a way to turn files into a pumpkin at midnight). Does anyone out there use expiration dates, and if so, what for? The doc. set was kinda turgid on this point. Expiration dates are one of VMS's less understood features. In order for the system to do anything automatic at all, you must set a retention period for the disk volume on which you want to use expiration dates. You do this with SET VOLUME/RETENTION=(min,max). Once you've done this, any time a file is accessed, the system will check to see that its expiration date is no nearer than NOW+min. If it is nearer, it will set the date to NOW+max. For example, suppose you set both min and max very small (say a tenth of a second). Then essentially every time a file is accessed (for read OR write) the expiration date will be "too near", and the expiration date will be set to more-or-less "now" - and so will essentially be a "last accessed" date. This requires a lot of extra disk operations, so you normally set larger values for min and max, thus trading disk I/O for a "fuzzier" measure of when the file was last accessed: All you can say is that it was between its expiration date minus min and its expiration date minus max. You can also set the expiration date yourself with SET FILE. No VMS facility actually USES the expiration date automatically for anything, but you can use it for file selection. For example, DIR/EXPIRED/BEFORE:TODAY will show you all the files whose expiration dates have passed. Or you can use BACKUP to move all expired files to a tape and then delete them. WARNING !!! WARNING !!! WARNING !!! WARNING !!! WARNING !!! WARNING !!! When you set the volume retention period for a volume for the first time, VMS does NOT do anything with the expiration dates of any files already on the volume; they will remain at 0 ("the beginning of VMS time") until they are first accessed. Hence EVERY FILE ON THE VOLUME WILL APPEAR TO BE EXPIRED! Trying to remove "expired" files shortly thereafter may remove a lot more than you expect. This "gotcha'" has grabbed more than one system manager. -- Jerry