I am going to analyze a batch of SAS program file and I am stucked in getting the last modified time of program files. I have thought about X
command but it was too inefficient.
I just find when I use infile
statement:
data test;
infile 'D:\test.txt' truncover;
input ;
run;
Log shows the last modified time:
NOTE: The infile 'D:\test.txt' is:
Filename=D:\test.txt,
RECFM=V,LRECL=32767,File Size (bytes)=7,
Last Modified=2021/1/26 15:25:48,
Create Time=2021/1/26 15:25:42
As you can see, log window shows the infomation of file as a NOTE. However, my wish output is a variable filled with Last Modified Time.
Is there some option to get it while using infile
statement?
Surely, Other efficient ways are welcomed, too.
Use functions
FOPEN
andFINFO
Example:
Show all available information items and their value for a sample data file.
Will log information such as