Hello All, I have few sas program, it's log file in .txt format which is located in a folder. I need to read all the log files and find the error messages. Please suggest me the code to do this.
%let path= D:\test\SASLOG ; /*the path of LOG file*/
filename x pipe "dir &path.\*.log /s /b";
data check_log;
infile x length=len;
input fvar $varying200. len;
length filename fname $ 200;
infile dummy filevar=fvar filename=fname end=last length=len;
do while(not last);
input log $varying400. len;
if upcase(log) in: ('ERROR' 'WARNING') then do;filename=fname;output;end;
end;
run;
proc print noobs;run;
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Registration is open
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss. Register now and lock in 2025 pricing—just $495!