<?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: Counts Errors, Warning and Notes appears in log in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Counts-Errors-Warning-and-Notes-appears-in-log/m-p/478189#M123281</link>
    <description>&lt;PRE&gt;
Firstly use PROC PRINTTO; to save LOG information and then use data step to count them all.

proc printto log='c:\temp\saslog.log' newfile;
run;

..........your sas code here.............

proc printto;run;

data _null_; 
 infile 'c:\temp\saslog.log'  end=last;
input;
if _infile_  =: 'ERROR' then count+1;
if last then putlog 'The number of ERROR is ' count ;
run;


&lt;/PRE&gt;</description>
    <pubDate>Sun, 15 Jul 2018 11:08:10 GMT</pubDate>
    <dc:creator>Ksharp</dc:creator>
    <dc:date>2018-07-15T11:08:10Z</dc:date>
    <item>
      <title>Counts Errors, Warning and Notes appears in log</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Counts-Errors-Warning-and-Notes-appears-in-log/m-p/478188#M123280</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Is there any way we can count number of errors or Warnings or Notes appears in log.&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Nikhil Jain</description>
      <pubDate>Sun, 15 Jul 2018 10:31:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Counts-Errors-Warning-and-Notes-appears-in-log/m-p/478188#M123280</guid>
      <dc:creator>Nikhiljain22740</dc:creator>
      <dc:date>2018-07-15T10:31:29Z</dc:date>
    </item>
    <item>
      <title>Re: Counts Errors, Warning and Notes appears in log</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Counts-Errors-Warning-and-Notes-appears-in-log/m-p/478189#M123281</link>
      <description>&lt;PRE&gt;
Firstly use PROC PRINTTO; to save LOG information and then use data step to count them all.

proc printto log='c:\temp\saslog.log' newfile;
run;

..........your sas code here.............

proc printto;run;

data _null_; 
 infile 'c:\temp\saslog.log'  end=last;
input;
if _infile_  =: 'ERROR' then count+1;
if last then putlog 'The number of ERROR is ' count ;
run;


&lt;/PRE&gt;</description>
      <pubDate>Sun, 15 Jul 2018 11:08:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Counts-Errors-Warning-and-Notes-appears-in-log/m-p/478189#M123281</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2018-07-15T11:08:10Z</dc:date>
    </item>
  </channel>
</rss>

