I finally was able to get the pipe syntax to at least run, I am not 100% sure but it seems to open the file up for viewing. In my case I eventually want to process every *.txt file on my Network file system so this does not work for my needs but is interesting. I was able to get something like this to work for me to a degree:
filename myFile 'D:\The_Directory_path\That_file.txt';
data want;
infile myFile truncover scanover;
input line $4096.;
run;
proc contents data=want;
run;
In my logs I get data like this:
747 filename myFile 'D:\The_Directory_path\That_file.txt'; 748 data want; 749 infile myFile truncover scanover; 750 input line $4096.; 751 run; NOTE: The infile MYFILE is: Filename=D:\The_Directory_path\That_file.txt, RECFM=V,LRECL=32767,File Size (bytes)=431, Last Modified=18Dec2015:09:52:12, Create Time=17Nov2015:10:13:37 NOTE: 18 records were read from the infile MYFILE. The minimum record length was 0. The maximum record length was 50. NOTE: The data set WORK.WANT has 18 observations and 1 variables. NOTE: DATA statement used (Total process time): real time 0.05 seconds cpu time 0.03 seconds
752 proc contents data=want; 753 run; NOTE: PROCEDURE CONTENTS used (Total process time): real time 0.01 seconds cpu time 0.01 seconds
Does anyone know how to trap Max/Min, and the time date created or modified in macros vars? I could use the metadata 🙂 I of course already have the file name and path in my program that this eventually fits into... TIA. -KJ
... View more