<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Summarise SAS Log for Errors, Warnings and Notes in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Summarise-SAS-Log-for-Errors-Warnings-and-Notes/m-p/239830#M44178</link>
    <description>&lt;P&gt;1. Use PROC PRINTTO to route the log to a file.&lt;/P&gt;
&lt;P&gt;2. Use data step to read in that log file keeping the lines you're interested in&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Quick example&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;/* route the log */
PROC PRINTTO LOG="directory/file.log' NEW;
RUN;

/* run all your regular sas code to generate the log */

/* return log to default */
PROC PRINTTO LOG=LOG;
RUN;
&lt;BR /&gt;/* read in the generated log file and keep what you want to see */
data processed_log;
  length line $1000;
  infile "directory/file.log";
  input;

  logfile = "directory/file.log";
  line_num = _n_;
  line = _infile_;
  issue = 0;
  
  if index(upcase(line),"ERROR") &amp;gt; 0 then do;
    issue = 1;
    output;
  end;
run;

  &lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I would treat that as pseudocode, but it should be flexible to fit your need. You can look for errors, warnings, notes, etc. with similar logic. Good luck.&lt;/P&gt;</description>
    <pubDate>Thu, 17 Dec 2015 19:58:46 GMT</pubDate>
    <dc:creator>JoshB</dc:creator>
    <dc:date>2015-12-17T19:58:46Z</dc:date>
    <item>
      <title>Summarise SAS Log for Errors, Warnings and Notes</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Summarise-SAS-Log-for-Errors-Warnings-and-Notes/m-p/239828#M44177</link>
      <description>&lt;P&gt;Hi Everyone,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would like to summarise the usual SAS LOG into more meaningful way, to identify quickly SAS log errors, warnings and notes.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please suggest ways of achieving this output.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards&lt;/P&gt;</description>
      <pubDate>Thu, 17 Dec 2015 19:45:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Summarise-SAS-Log-for-Errors-Warnings-and-Notes/m-p/239828#M44177</guid>
      <dc:creator>dkanand86</dc:creator>
      <dc:date>2015-12-17T19:45:26Z</dc:date>
    </item>
    <item>
      <title>Re: Summarise SAS Log for Errors, Warnings and Notes</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Summarise-SAS-Log-for-Errors-Warnings-and-Notes/m-p/239830#M44178</link>
      <description>&lt;P&gt;1. Use PROC PRINTTO to route the log to a file.&lt;/P&gt;
&lt;P&gt;2. Use data step to read in that log file keeping the lines you're interested in&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Quick example&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;/* route the log */
PROC PRINTTO LOG="directory/file.log' NEW;
RUN;

/* run all your regular sas code to generate the log */

/* return log to default */
PROC PRINTTO LOG=LOG;
RUN;
&lt;BR /&gt;/* read in the generated log file and keep what you want to see */
data processed_log;
  length line $1000;
  infile "directory/file.log";
  input;

  logfile = "directory/file.log";
  line_num = _n_;
  line = _infile_;
  issue = 0;
  
  if index(upcase(line),"ERROR") &amp;gt; 0 then do;
    issue = 1;
    output;
  end;
run;

  &lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I would treat that as pseudocode, but it should be flexible to fit your need. You can look for errors, warnings, notes, etc. with similar logic. Good luck.&lt;/P&gt;</description>
      <pubDate>Thu, 17 Dec 2015 19:58:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Summarise-SAS-Log-for-Errors-Warnings-and-Notes/m-p/239830#M44178</guid>
      <dc:creator>JoshB</dc:creator>
      <dc:date>2015-12-17T19:58:46Z</dc:date>
    </item>
    <item>
      <title>Re: Summarise SAS Log for Errors, Warnings and Notes</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Summarise-SAS-Log-for-Errors-Warnings-and-Notes/m-p/239831#M44179</link>
      <description>GOOGLE SAS LOG PARSER to find several macro's that parse the log.</description>
      <pubDate>Thu, 17 Dec 2015 19:58:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Summarise-SAS-Log-for-Errors-Warnings-and-Notes/m-p/239831#M44179</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2015-12-17T19:58:58Z</dc:date>
    </item>
    <item>
      <title>Re: Summarise SAS Log for Errors, Warnings and Notes</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Summarise-SAS-Log-for-Errors-Warnings-and-Notes/m-p/239837#M44180</link>
      <description>&lt;P&gt;ok&lt;/P&gt;</description>
      <pubDate>Thu, 17 Dec 2015 20:30:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Summarise-SAS-Log-for-Errors-Warnings-and-Notes/m-p/239837#M44180</guid>
      <dc:creator>dkanand86</dc:creator>
      <dc:date>2015-12-17T20:30:23Z</dc:date>
    </item>
    <item>
      <title>Re: Summarise SAS Log for Errors, Warnings and Notes</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Summarise-SAS-Log-for-Errors-Warnings-and-Notes/m-p/239851#M44183</link>
      <description>&lt;P&gt;Both SAS Enterprise Guide and SAS Studio&amp;nbsp;do that without any extra coding.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;These SAS clients work with either local PC SAS or remote SAS servers.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 18 Dec 2015 23:55:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Summarise-SAS-Log-for-Errors-Warnings-and-Notes/m-p/239851#M44183</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2015-12-18T23:55:22Z</dc:date>
    </item>
  </channel>
</rss>

