<?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: Avoid the word ERROR when programming in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Avoid-the-word-ERROR-when-programming/m-p/118246#M24400</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not sure that i understood your question, but when looking for errors in the log searching for "&lt;SPAN style="font-family: courier new,courier;"&gt;ERROR:&lt;SPAN style="font-family: arial,helvetica,sans-serif;"&gt;"&lt;/SPAN&gt;&lt;/SPAN&gt; instead of "ERROR" does the trick - the colon is the important thing.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 25 Jun 2013 15:29:58 GMT</pubDate>
    <dc:creator>andreas_lds</dc:creator>
    <dc:date>2013-06-25T15:29:58Z</dc:date>
    <item>
      <title>Avoid the word ERROR when programming</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Avoid-the-word-ERROR-when-programming/m-p/118245#M24399</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I avoid to write the word Error in a way that when I look for errors in my log this word doesn't appear?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data mydata;&lt;/P&gt;&lt;P&gt;set mydata;&lt;/P&gt;&lt;P&gt;label StdErr = "Standard|Error";&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have tried things like "Standard|Err""or", "Standard|Err%str(or)", using a macro variable but nothing of this works.&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;regards,&lt;/P&gt;&lt;P&gt;juan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Jun 2013 15:01:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Avoid-the-word-ERROR-when-programming/m-p/118245#M24399</guid>
      <dc:creator>JuanVte</dc:creator>
      <dc:date>2013-06-25T15:01:29Z</dc:date>
    </item>
    <item>
      <title>Re: Avoid the word ERROR when programming</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Avoid-the-word-ERROR-when-programming/m-p/118246#M24400</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not sure that i understood your question, but when looking for errors in the log searching for "&lt;SPAN style="font-family: courier new,courier;"&gt;ERROR:&lt;SPAN style="font-family: arial,helvetica,sans-serif;"&gt;"&lt;/SPAN&gt;&lt;/SPAN&gt; instead of "ERROR" does the trick - the colon is the important thing.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Jun 2013 15:29:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Avoid-the-word-ERROR-when-programming/m-p/118246#M24400</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2013-06-25T15:29:58Z</dc:date>
    </item>
    <item>
      <title>Re: Avoid the word ERROR when programming</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Avoid-the-word-ERROR-when-programming/m-p/118247#M24401</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, you got it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For a period of time I used to look for the word ERROR ticking the case sensitive option in the find window but then I realized that not all errors are uppercase, sometimes you get Error too. Because of this I basically thought SAS might do the same with the colon sometimes use it, sometimes not. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you know for sure that all SAS errors are followed by a colon? if so, that might solve my problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your help andreas.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Jun 2013 15:44:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Avoid-the-word-ERROR-when-programming/m-p/118247#M24401</guid>
      <dc:creator>JuanVte</dc:creator>
      <dc:date>2013-06-25T15:44:52Z</dc:date>
    </item>
    <item>
      <title>Re: Avoid the word ERROR when programming</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Avoid-the-word-ERROR-when-programming/m-p/118248#M24402</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Actually there are ERRORS in the log that don't have a colon immediately after the word error.&amp;nbsp; And sometimes people like to be able to hit CTL-F "error" to search their log.&amp;nbsp; So when writing code (macros typically) that will be used by others, I also try to avoid the work error in my code as much as possible (not everyone uses as an automated log scanner, even if they "should").&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm stuck on this example however.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For data step PUT statements, I usually do: PUT "ER" "ROR: something bad happened".&amp;nbsp; And the PUT statement doesn't complain at the blank in between.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In macro land I do %PUT %ER%str()ROR: bad parameter value...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I had hoped you could do: Label StdErr="Standard Er" "ror"&amp;nbsp;&amp;nbsp; ;&amp;nbsp; but the label statement complains.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you are in open code (outside of macro definition) then you can do: Label StdErr="Standard Er%str()ror" ;&amp;nbsp; but if you do that inside of a macro defintion and turn on MPRINT, you will still get the word Error in your log.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I guess if you really wanted to avoid the word error (unless the error condition is generated), you could use the %str() approach, and then in the macro force MPRINT off (and restore it at the end).&amp;nbsp; But that seems like over-kill, and I like MPRINT too much to do that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Will look forward to seeing responses from others.&lt;/P&gt;&lt;P&gt;--Q.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Jun 2013 15:47:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Avoid-the-word-ERROR-when-programming/m-p/118248#M24402</guid>
      <dc:creator>Quentin</dc:creator>
      <dc:date>2013-06-25T15:47:18Z</dc:date>
    </item>
    <item>
      <title>Re: Avoid the word ERROR when programming</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Avoid-the-word-ERROR-when-programming/m-p/118249#M24403</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here is an example of an error message that does not have a semicolon immediately after the word error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;143&amp;nbsp; data a;
144&amp;nbsp;&amp;nbsp;&amp;nbsp; x=1;
145&amp;nbsp;&amp;nbsp;&amp;nbsp; format x unknown.;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; --------
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 48
ERROR 48-59: The format UNKNOWN was not found or could not be loaded.

146&amp;nbsp; run;

&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have seen a good number of log scanners that will fail to detect such error messages. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Jun 2013 15:50:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Avoid-the-word-ERROR-when-programming/m-p/118249#M24403</guid>
      <dc:creator>Quentin</dc:creator>
      <dc:date>2013-06-25T15:50:16Z</dc:date>
    </item>
    <item>
      <title>Re: Avoid the word ERROR when programming</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Avoid-the-word-ERROR-when-programming/m-p/118250#M24404</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As you have seen, you'll need to be creative to handle all cases.&amp;nbsp; Some alternate spellings might be acceptable.&amp;nbsp; A couple of ideas:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;label StdErr = 'Standard|Err';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;label StdErr = 'Standard|E r r o r';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or you could temporarily reroute the log using PROC PRINTTO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or you could temporarily eliminate the source code from the log (OPTIONS NOSOURCE / SOURCE).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I don't see a perfect solution either.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Good luck.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Jun 2013 15:52:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Avoid-the-word-ERROR-when-programming/m-p/118250#M24404</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2013-06-25T15:52:45Z</dc:date>
    </item>
    <item>
      <title>Re: Avoid the word ERROR when programming</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Avoid-the-word-ERROR-when-programming/m-p/118251#M24405</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;a regex like '%ERROR*:' will find that one.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Jun 2013 16:08:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Avoid-the-word-ERROR-when-programming/m-p/118251#M24405</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2013-06-25T16:08:49Z</dc:date>
    </item>
  </channel>
</rss>

