<?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: custom error creation in SAS macro in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/custom-error-creation-in-SAS-macro/m-p/365204#M86712</link>
    <description>&lt;P&gt;Even if there is no difference (and there could be, with quoting characters being added to the message), there is an important practical difference. &amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When you search the log later looking for ERROR, it would be nice for the search to be clean if there were no errors. &amp;nbsp;If the macro contains the word ERROR, the search will find it. &amp;nbsp;You will spend a small amount of mental energy determining that you can ignore it, because it was only part of a macro definition. &amp;nbsp;But if the macro contains %STR(ER)ROR instead, the search finds nothing unless an error actually occurred.&lt;/P&gt;</description>
    <pubDate>Thu, 08 Jun 2017 00:52:49 GMT</pubDate>
    <dc:creator>Astounding</dc:creator>
    <dc:date>2017-06-08T00:52:49Z</dc:date>
    <item>
      <title>custom error creation in SAS macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/custom-error-creation-in-SAS-macro/m-p/365199#M86708</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I don't see the difference in error created &amp;nbsp;in log by two %put statement below. Log check will detect both of them.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%macro m (a);
	%if &amp;amp;a ^= chk %then
		%do;
			%put %str(ER)ROR: has occured;
			%put ERROR: has occured;
		%end;
%mend m;

%m(bak)&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 08 Jun 2017 00:25:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/custom-error-creation-in-SAS-macro/m-p/365199#M86708</guid>
      <dc:creator>SAS_inquisitive</dc:creator>
      <dc:date>2017-06-08T00:25:49Z</dc:date>
    </item>
    <item>
      <title>Re: custom error creation in SAS macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/custom-error-creation-in-SAS-macro/m-p/365204#M86712</link>
      <description>&lt;P&gt;Even if there is no difference (and there could be, with quoting characters being added to the message), there is an important practical difference. &amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When you search the log later looking for ERROR, it would be nice for the search to be clean if there were no errors. &amp;nbsp;If the macro contains the word ERROR, the search will find it. &amp;nbsp;You will spend a small amount of mental energy determining that you can ignore it, because it was only part of a macro definition. &amp;nbsp;But if the macro contains %STR(ER)ROR instead, the search finds nothing unless an error actually occurred.&lt;/P&gt;</description>
      <pubDate>Thu, 08 Jun 2017 00:52:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/custom-error-creation-in-SAS-macro/m-p/365204#M86712</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2017-06-08T00:52:49Z</dc:date>
    </item>
    <item>
      <title>Re: custom error creation in SAS macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/custom-error-creation-in-SAS-macro/m-p/365205#M86713</link>
      <description>It is based on the keywords the log identifies the words. For example ERROR, WARNING &lt;BR /&gt;&lt;BR /&gt;In your case the %str is a compilation macro function used to mask the special characters. However there are no special characters in the text you mentioned. So the %str is ignored and the entire text is read as keyword that is recognized by the log.</description>
      <pubDate>Thu, 08 Jun 2017 00:53:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/custom-error-creation-in-SAS-macro/m-p/365205#M86713</guid>
      <dc:creator>Jagadishkatam</dc:creator>
      <dc:date>2017-06-08T00:53:00Z</dc:date>
    </item>
  </channel>
</rss>

