<?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 Find errors in log messages in SAS Software for Learning Community</title>
    <link>https://communities.sas.com/t5/SAS-Software-for-Learning/Find-errors-in-log-messages/m-p/830854#M611</link>
    <description>Hello All,&lt;BR /&gt;I have few sas program, it's log file in .txt format which is located in a folder. I need to read all the log files and find the error messages. Please suggest me the code to do this.</description>
    <pubDate>Mon, 29 Aug 2022 09:26:03 GMT</pubDate>
    <dc:creator>Karthik22</dc:creator>
    <dc:date>2022-08-29T09:26:03Z</dc:date>
    <item>
      <title>Find errors in log messages</title>
      <link>https://communities.sas.com/t5/SAS-Software-for-Learning/Find-errors-in-log-messages/m-p/830854#M611</link>
      <description>Hello All,&lt;BR /&gt;I have few sas program, it's log file in .txt format which is located in a folder. I need to read all the log files and find the error messages. Please suggest me the code to do this.</description>
      <pubDate>Mon, 29 Aug 2022 09:26:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Software-for-Learning/Find-errors-in-log-messages/m-p/830854#M611</guid>
      <dc:creator>Karthik22</dc:creator>
      <dc:date>2022-08-29T09:26:03Z</dc:date>
    </item>
    <item>
      <title>Re: Find errors in log messages</title>
      <link>https://communities.sas.com/t5/SAS-Software-for-Learning/Find-errors-in-log-messages/m-p/830870#M612</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let path= D:\test\SASLOG ;    /*the path of LOG file*/


filename x pipe "dir &amp;amp;path.\*.log /s /b";
data check_log;
infile x length=len;
input fvar $varying200. len;

length filename fname $ 200;
infile dummy filevar=fvar filename=fname end=last length=len;
do while(not last);
 input log $varying400. len;
 if upcase(log) in: ('ERROR' 'WARNING') then do;filename=fname;output;end;
end;
run;

proc print noobs;run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 29 Aug 2022 11:58:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Software-for-Learning/Find-errors-in-log-messages/m-p/830870#M612</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2022-08-29T11:58:17Z</dc:date>
    </item>
  </channel>
</rss>

