<?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: Checking for errors, warnings in the log in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Checking-for-errors-warnings-in-the-log/m-p/255177#M48727</link>
    <description>&lt;P&gt;Gives the error description an the line of code:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
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;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 08 Mar 2016 07:16:10 GMT</pubDate>
    <dc:creator>user24feb</dc:creator>
    <dc:date>2016-03-08T07:16:10Z</dc:date>
    <item>
      <title>Checking for errors, warnings in the log</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Checking-for-errors-warnings-in-the-log/m-p/254983#M48683</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a SAS code out there that can help me scan errors in a log file with the line number the errors occur?&lt;/P&gt;&lt;P&gt;for ex: check for errors, warnings and tells me what line number is that occuring..&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Will appreciate any help!!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;--Tej&lt;/P&gt;</description>
      <pubDate>Mon, 07 Mar 2016 16:27:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Checking-for-errors-warnings-in-the-log/m-p/254983#M48683</guid>
      <dc:creator>Tej27</dc:creator>
      <dc:date>2016-03-07T16:27:09Z</dc:date>
    </item>
    <item>
      <title>Re: Checking for errors, warnings in the log</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Checking-for-errors-warnings-in-the-log/m-p/255009#M48694</link>
      <description>&lt;P&gt;Well, I think EG or one of the other SAS products has a summary which gives a count for each WARNING, ERROR and NOTE. &amp;nbsp;I have developed a couple of these in both SAS and C#, it is a simple load text file and scan for elements you want to scan. &amp;nbsp;I will not provide you code as that is proprietary, but a couple of pointers.&lt;/P&gt;
&lt;P&gt;data ...;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; infile "&amp;lt;your_log&amp;gt;"...;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; input buffer $;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data ...;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; set &amp;lt;dataset above&amp;gt;;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; if index(buffer,"ERROR") &amp;gt; 0 then...&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;</description>
      <pubDate>Mon, 07 Mar 2016 17:19:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Checking-for-errors-warnings-in-the-log/m-p/255009#M48694</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2016-03-07T17:19:01Z</dc:date>
    </item>
    <item>
      <title>Re: Checking for errors, warnings in the log</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Checking-for-errors-warnings-in-the-log/m-p/255177#M48727</link>
      <description>&lt;P&gt;Gives the error description an the line of code:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
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;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 08 Mar 2016 07:16:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Checking-for-errors-warnings-in-the-log/m-p/255177#M48727</guid>
      <dc:creator>user24feb</dc:creator>
      <dc:date>2016-03-08T07:16:10Z</dc:date>
    </item>
  </channel>
</rss>

