<?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: SAS error information in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/SAS-error-information/m-p/113732#M31495</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Google "findstr", here is one hit:&amp;nbsp; &lt;A href="http://ss64.com/nt/findstr.html" title="http://ss64.com/nt/findstr.html"&gt;Findstr - Search for strings&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You could also use Powershell but that would be slightly more complicated.&amp;nbsp; I do like Powershell's support of context, where you can print x number of lines before or after the text match.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Google "powershell select-string", here is one hit:&amp;nbsp; &lt;A href="http://blogs.msdn.com/b/powershell/archive/2008/03/23/select-string-and-grep.aspx" title="http://blogs.msdn.com/b/powershell/archive/2008/03/23/select-string-and-grep.aspx"&gt; Select-String and Grep - Windows PowerShell Blog - Site Home - MSDN Blogs&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HTH,&lt;/P&gt;&lt;P&gt;Scott&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 21 Jul 2012 03:15:55 GMT</pubDate>
    <dc:creator>ScottBass</dc:creator>
    <dc:date>2012-07-21T03:15:55Z</dc:date>
    <item>
      <title>SAS error information</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/SAS-error-information/m-p/113727#M31490</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to track error information after a whole SAS program has been finished,I know &amp;amp;syserr will set to 1 immediate after an error happen.&lt;/P&gt;&lt;P&gt;BUT &amp;amp;syserr will be override back to 0 when a NO-ERROR step was executed.&lt;/P&gt;&lt;P&gt;so finallly &amp;amp;syserr's value react for the last step. if the last step has error then &amp;amp;syserr will be set to 1,, otherwise will be 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MY question is: how we can know whether there was&lt;STRONG&gt; ANY&lt;/STRONG&gt; error happened durng the whole program?------Any macro similar as &amp;amp;syserr but doesn't set back to 0?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;PLEASE NOTICE&lt;/STRONG&gt;&lt;/SPAN&gt;:(suppose we &lt;STRONG&gt;CAN'T&lt;/STRONG&gt; set a new macro variable after EACH process of the program.such as: %if &amp;amp;syserror=1 then %let flag='error happened" ,&lt;/P&gt;&lt;P&gt;this need too much extra work if there were too much process in the program,,,maybe there were 1000 datasteps and 500 procedures in the program...)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mike&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/*sasprogram.sas*/&lt;/P&gt;&lt;P&gt;%put -----0 &amp;amp;syserr;&lt;/P&gt;&lt;P&gt;data a1;/*error happen here,*/&lt;/P&gt;&lt;P&gt;set sashelp.class2;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;%put -----1 &amp;amp;syserr;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/*&lt;/P&gt;&lt;P&gt;data a(n);&lt;/P&gt;&lt;P&gt;set sashelp.class;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;%put -----n &amp;amp;syserr;&lt;/P&gt;&lt;P&gt;*/&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data a100;&lt;/P&gt;&lt;P&gt;set sashelp.class;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;%put -----100 &amp;amp;syserr;/*but here &amp;amp;syserror set back from 1 to 0,,,I want a value show us there was ever error happened during the whole program*/&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Jul 2012 14:40:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/SAS-error-information/m-p/113727#M31490</guid>
      <dc:creator>Mike_Davis</dc:creator>
      <dc:date>2012-07-20T14:40:53Z</dc:date>
    </item>
    <item>
      <title>Re: SAS error information</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/SAS-error-information/m-p/113728#M31491</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How about just reading the log and searching for the text string 'error:'?&amp;nbsp; The Unix command "grep" has nice features for showing the error in context (and is also available for the PC).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I use it to search for warnings too, as they can actually be insidious errors.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Doc Muhlbaier&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Jul 2012 14:50:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/SAS-error-information/m-p/113728#M31491</guid>
      <dc:creator>Doc_Duke</dc:creator>
      <dc:date>2012-07-20T14:50:49Z</dc:date>
    </item>
    <item>
      <title>Re: SAS error information</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/SAS-error-information/m-p/113729#M31492</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think you want this one.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;H1&gt;&lt;A name="tw3514-syscc-var"&gt;SYSCC Automatic Macro Variable&lt;/A&gt;&lt;/H1&gt;&lt;HR /&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;SPAN class="shortDesc"&gt;Contains the current condition code that SAS returns to your operating environment (the operating environment condition code).&lt;/SPAN&gt;&amp;nbsp; &lt;/P&gt;&lt;TABLE cellpadding="4" cellspacing="2"&gt;&lt;TBODY&gt;&lt;TR valign="top"&gt;&lt;TD align="right" class="label" nowrap="nowrap"&gt;Type:&lt;/TD&gt;&lt;TD align="left" class="bgBlockDark"&gt;Automatic macro variable (read and write) &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Jul 2012 14:50:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/SAS-error-information/m-p/113729#M31492</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2012-07-20T14:50:50Z</dc:date>
    </item>
    <item>
      <title>Re: SAS error information</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/SAS-error-information/m-p/113730#M31493</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Dr.Duke,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your suggestion is very interesting to me! would you like to share your "grep" code under PC enviroment?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Jul 2012 20:28:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/SAS-error-information/m-p/113730#M31493</guid>
      <dc:creator>Mike_Davis</dc:creator>
      <dc:date>2012-07-20T20:28:32Z</dc:date>
    </item>
    <item>
      <title>Re: SAS error information</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/SAS-error-information/m-p/113731#M31494</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This really is a read and write automacro.I am trying to find a macro like this for a while&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SYSCC is a read/write automatic macro variable that enables you to reset the job condition code and to recover from conditions that prevent subsequent steps from running. The values for SYSCC are:&amp;nbsp; &lt;/P&gt;&lt;UL&gt;&lt;LI&gt;0 is no errors no warnings&amp;nbsp; &lt;/LI&gt;&lt;LI&gt;4 is warnings&amp;nbsp; &lt;/LI&gt;&lt;LI&gt;&amp;gt; 4 is an error occurred &lt;/LI&gt;&lt;/UL&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Jul 2012 20:38:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/SAS-error-information/m-p/113731#M31494</guid>
      <dc:creator>Mike_Davis</dc:creator>
      <dc:date>2012-07-20T20:38:15Z</dc:date>
    </item>
    <item>
      <title>Re: SAS error information</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/SAS-error-information/m-p/113732#M31495</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Google "findstr", here is one hit:&amp;nbsp; &lt;A href="http://ss64.com/nt/findstr.html" title="http://ss64.com/nt/findstr.html"&gt;Findstr - Search for strings&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You could also use Powershell but that would be slightly more complicated.&amp;nbsp; I do like Powershell's support of context, where you can print x number of lines before or after the text match.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Google "powershell select-string", here is one hit:&amp;nbsp; &lt;A href="http://blogs.msdn.com/b/powershell/archive/2008/03/23/select-string-and-grep.aspx" title="http://blogs.msdn.com/b/powershell/archive/2008/03/23/select-string-and-grep.aspx"&gt; Select-String and Grep - Windows PowerShell Blog - Site Home - MSDN Blogs&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HTH,&lt;/P&gt;&lt;P&gt;Scott&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 21 Jul 2012 03:15:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/SAS-error-information/m-p/113732#M31495</guid>
      <dc:creator>ScottBass</dc:creator>
      <dc:date>2012-07-21T03:15:55Z</dc:date>
    </item>
  </channel>
</rss>

