I have a file which sits in a folder on our server which is read only. This file is overidden monthly with new data from an external source. The date which this update is made is not consistant and therefore a batch job which runs on any specific date is impossible (well pointless).
What I originally wanted to do (without knowing the directory was read only) was to move the file to a new location on the day which it was updated, delete the initial file and run the rest of my code on the newly transfered data. The code for this was simple and worked like a charm. However, I discovered that the directory was read only and therefore my daily batch wants to pick it up everyday (as the file always exists).
I wondered if anyone knew a way of SAS identifying when a file had been modified, via the modified date.
This should've been a perfect task for the FINFO function. However, on 9.1.3/Solaris it has support only for File name, Owner name, Group name, Access Permission and File Size. If you have access to 9.2, try to run this code end see if something else pops up:
length infoname infoval $60;
*drop rc fid infonum i close;
do i=1 to infonum;
Otherwise, I guess you have to use os commands to retrieve the information you want. That can be done quite neatly by using the PIPE filename option.
Along the same idea from Doc@Duke, the FILENAME supports the "pipe" engine to read/process a directory list. Check the SAS support website for additional references - here is one SUGI/SGF paper on the topic.