<?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: Programmatically check log for error messages? in SAS Health and Life Sciences</title>
    <link>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/Programmatically-check-log-for-error-messages/m-p/5357#M461</link>
    <description>Thanks to both!</description>
    <pubDate>Wed, 07 Nov 2007 20:26:20 GMT</pubDate>
    <dc:creator>sassygrl</dc:creator>
    <dc:date>2007-11-07T20:26:20Z</dc:date>
    <item>
      <title>Programmatically check log for error messages?</title>
      <link>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/Programmatically-check-log-for-error-messages/m-p/5354#M458</link>
      <description>As the subject line says, is there a way to programmatically check the log for error/warning messages? &lt;BR /&gt;
&lt;BR /&gt;
I'm thinking in terms of a yes/no macro variable, or maybe an option to stop submitting code once there is an error message.&lt;BR /&gt;
&lt;BR /&gt;
Thanks!</description>
      <pubDate>Fri, 02 Nov 2007 15:56:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/Programmatically-check-log-for-error-messages/m-p/5354#M458</guid>
      <dc:creator>sassygrl</dc:creator>
      <dc:date>2007-11-02T15:56:44Z</dc:date>
    </item>
    <item>
      <title>Re: Programmatically check log for error messages?</title>
      <link>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/Programmatically-check-log-for-error-messages/m-p/5355#M459</link>
      <description>If you save the log to a file, you can search it with grep or using the SAS perl regular expressions.  I'm not sure that is what you were searching for, but it works reasonably well in a batch environment.&lt;BR /&gt;
&lt;BR /&gt;
Doc Muhlbaier&lt;BR /&gt;
Duke</description>
      <pubDate>Sat, 03 Nov 2007 03:04:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/Programmatically-check-log-for-error-messages/m-p/5355#M459</guid>
      <dc:creator>Doc_Duke</dc:creator>
      <dc:date>2007-11-03T03:04:34Z</dc:date>
    </item>
    <item>
      <title>Re: Programmatically check log for error messages?</title>
      <link>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/Programmatically-check-log-for-error-messages/m-p/5356#M460</link>
      <description>In my humble opinion, the best approach by far is to save the log as a file and then parse it for any of the SAS statements that indicate we have wrong data, bad code, system issues or misunderstandings.  These can be as simple or as comprehensive as you need.&lt;BR /&gt;
&lt;BR /&gt;
You might also look up the system macro symbols in the documentation that start with %Sys.  These can give you some insight into the success or failure of individual steps.&lt;BR /&gt;
&lt;BR /&gt;
Kind regards&lt;BR /&gt;
&lt;BR /&gt;
David</description>
      <pubDate>Mon, 05 Nov 2007 09:31:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/Programmatically-check-log-for-error-messages/m-p/5356#M460</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2007-11-05T09:31:34Z</dc:date>
    </item>
    <item>
      <title>Re: Programmatically check log for error messages?</title>
      <link>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/Programmatically-check-log-for-error-messages/m-p/5357#M461</link>
      <description>Thanks to both!</description>
      <pubDate>Wed, 07 Nov 2007 20:26:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/Programmatically-check-log-for-error-messages/m-p/5357#M461</guid>
      <dc:creator>sassygrl</dc:creator>
      <dc:date>2007-11-07T20:26:20Z</dc:date>
    </item>
    <item>
      <title>Re: Programmatically check log for error messages?</title>
      <link>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/Programmatically-check-log-for-error-messages/m-p/5358#M462</link>
      <description>For those using Unix, a shell program like the following could catch common errors:&lt;BR /&gt;
&lt;BR /&gt;
#!/bin/ksh&lt;BR /&gt;
if [ $# != 1 ]&lt;BR /&gt;
then&lt;BR /&gt;
  echo "Usage: mylogchecker.sh &lt;FILENAME&gt;"&lt;BR /&gt;
  exit -1&lt;BR /&gt;
fi&lt;BR /&gt;
&lt;BR /&gt;
grep -n ERROR ./$1&lt;BR /&gt;
grep -n WARNING ./$1&lt;BR /&gt;
grep -in UNINITIALIZED ./$1&lt;BR /&gt;
grep -in CONVERTED ./$1&lt;BR /&gt;
grep -in REPEATS ./$1&lt;BR /&gt;
grep -in 'BY ZERO' ./$1&lt;BR /&gt;
grep -in UNKNOWN ./$1&lt;BR /&gt;
grep -in 49-169 ./$1&lt;BR /&gt;
exit&lt;/FILENAME&gt;</description>
      <pubDate>Mon, 28 Jan 2008 22:42:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/Programmatically-check-log-for-error-messages/m-p/5358#M462</guid>
      <dc:creator>JasonDiVirgilio</dc:creator>
      <dc:date>2008-01-28T22:42:03Z</dc:date>
    </item>
  </channel>
</rss>

