Gives the error description an the line of code:
Proc PrintTo Log="C:\Users\NAME\Desktop\Test_Log.Log" NEW;
Run;
Proc DO_NOT_EXIST_Print; Run; * create an error;
Proc DO_NOT_EXIST_Print; Run;
Proc DO_NOT_EXIST_Print; Run;
Proc PrintTo;
Run;
Data LogCheck;
Infile "C:\Users\NAME\Desktop\Test_Log.Log" Delimiter='09'x Missover DSD Lrecl=32767;
Informat LogLine $200.;
Format LogLine $200.;
Input Logline $;
Length Codeline $10.;
Retain CodeLine '.';
CodeLine=IfC(NotDigit(Substr(LogLine,1,1)),CodeLine,Scan(LogLine,1,' '));
If Logline=:"ERROR:" Then Output;
Run;
... View more