Krishna123,
If you are running BASE SAS you can use the logic in the code below to create a data set that will contain the message of all errors found in your SAS log. The proc printto creates a copy of the log in the file specified by log=, then the data step reads that log file. You will need to create counters for errors, warnings and notes that are found in the log file. I suggest you use the end= option on the set statement and output only during the last iteration of the data step. This way your data set will just have the final value of your counter variables.
If you want the counters at the beginning of the log file you will need to use a data _null_ step, read the log file and write out to the file when _n_=1, the final value of your counters.
I hope this will help you get started.
Michelle
proc printto log='c:\1test\mylog.txt' new; data test; input x1 x2 x3; cards /*no semicolon*/ 1 2 3 4 5 6 ; proc print; run; proc printto log=log; run; data logtest; infile 'c:\1test\mylog.txt' truncover; input test $5. @; if test='ERROR' then do; input @6 msg $76.; output; end; run; proc print data=logtest; run;
... View more