03-18-2016 12:18 AM
Is there a way to get the last access of some Data Set?
I know its possible to get last modified date, create date, file size, etc...
Could we know the last day someone opened or read this Data Set, by clicking or using FROM, SET, APPEND, etc?
03-18-2016 12:35 AM
03-18-2016 01:12 AM
03-18-2016 03:40 AM
On which operating system does your SAS run? (Not the EG)
03-18-2016 07:48 AM
In linux, ls -ul filename will display the last access time.
filename oscmd pipe "ls -ul &filename"; data acctime; infile oscmd; length perms $10 links 3 user $8 group $8 size 8 month $3 day 3 ytime $5 fname $100 year 3 time 8 ; format time time5. acc_time datetime19. ; input perms links user group size month day ytime fname; if length(ytime) = 4 then do; year = input(ytime,4.); time = 0; end; else do; year = year(date()); time = input(ytime,time5.); end; acdate = input(put(day,z2.)!!month!!put(year,z4.),date9.); acc_time = acdate * 86400 + time; run;
03-18-2016 08:49 AM
03-18-2016 08:57 AM
Reading http://unix.stackexchange.com/questions/8840/last-time-file-opened closely, it may be that your filesystem is mounted with the noatime option, which prevents recording of access times for performance reasons. If your filesystem has mainly SAS data, mounting it without noatime should not be a problem, as with SAS the files are relatively large, and open/close are rare operations compared to file read/write.