<?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 a bug with SAS macro?! (SAS8.2 for windows) in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/a-bug-with-SAS-macro-SAS8-2-for-windows/m-p/11597#M1106</link>
    <description>submit the following:&lt;BR /&gt;
&lt;BR /&gt;
%let name=%quote(aaa'ggg);&lt;BR /&gt;
%put &amp;amp;name;&lt;BR /&gt;
&lt;BR /&gt;
and then issue %put &amp;amp;name; again, the screen displays&lt;BR /&gt;
aaa'ggg);%put &amp;amp;name;';&lt;BR /&gt;
&lt;BR /&gt;
which is not strange since ' is not paired, then submit the following:&lt;BR /&gt;
&lt;BR /&gt;
%let name=%quote(aaa'ggg');&lt;BR /&gt;
%put &amp;amp;name;&lt;BR /&gt;
&lt;BR /&gt;
the screen displays error/warning:&lt;BR /&gt;
%let name=%quote(aaa'ggg');&lt;BR /&gt;
NOTE:  A missing equals sign has been inserted after the variable name NAME.&lt;BR /&gt;
%put &amp;amp;name;&lt;BR /&gt;
ERROR: Open code statement recursion detected.&lt;BR /&gt;
&lt;BR /&gt;
If then issue %put &amp;amp;name; to check what's in the macro name, the screen displays &lt;BR /&gt;
=aaa'ggg';;&lt;BR /&gt;
&lt;BR /&gt;
Question:&lt;BR /&gt;
(1) The above execution result is very odd to me. Why would the initial error last for ever? &lt;BR /&gt;
(2) Why would the macro name be assigned that way at the end? &lt;BR /&gt;
(3) Why would the system complain "recursion detected"?</description>
    <pubDate>Wed, 04 Nov 2009 08:17:15 GMT</pubDate>
    <dc:creator>bsmile</dc:creator>
    <dc:date>2009-11-04T08:17:15Z</dc:date>
    <item>
      <title>a bug with SAS macro?! (SAS8.2 for windows)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/a-bug-with-SAS-macro-SAS8-2-for-windows/m-p/11597#M1106</link>
      <description>submit the following:&lt;BR /&gt;
&lt;BR /&gt;
%let name=%quote(aaa'ggg);&lt;BR /&gt;
%put &amp;amp;name;&lt;BR /&gt;
&lt;BR /&gt;
and then issue %put &amp;amp;name; again, the screen displays&lt;BR /&gt;
aaa'ggg);%put &amp;amp;name;';&lt;BR /&gt;
&lt;BR /&gt;
which is not strange since ' is not paired, then submit the following:&lt;BR /&gt;
&lt;BR /&gt;
%let name=%quote(aaa'ggg');&lt;BR /&gt;
%put &amp;amp;name;&lt;BR /&gt;
&lt;BR /&gt;
the screen displays error/warning:&lt;BR /&gt;
%let name=%quote(aaa'ggg');&lt;BR /&gt;
NOTE:  A missing equals sign has been inserted after the variable name NAME.&lt;BR /&gt;
%put &amp;amp;name;&lt;BR /&gt;
ERROR: Open code statement recursion detected.&lt;BR /&gt;
&lt;BR /&gt;
If then issue %put &amp;amp;name; to check what's in the macro name, the screen displays &lt;BR /&gt;
=aaa'ggg';;&lt;BR /&gt;
&lt;BR /&gt;
Question:&lt;BR /&gt;
(1) The above execution result is very odd to me. Why would the initial error last for ever? &lt;BR /&gt;
(2) Why would the macro name be assigned that way at the end? &lt;BR /&gt;
(3) Why would the system complain "recursion detected"?</description>
      <pubDate>Wed, 04 Nov 2009 08:17:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/a-bug-with-SAS-macro-SAS8-2-for-windows/m-p/11597#M1106</guid>
      <dc:creator>bsmile</dc:creator>
      <dc:date>2009-11-04T08:17:15Z</dc:date>
    </item>
    <item>
      <title>Re: a bug with SAS macro?! (SAS8.2 for windows)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/a-bug-with-SAS-macro-SAS8-2-for-windows/m-p/11598#M1107</link>
      <description>&lt;A href="http://swwafs.unx.sas.com/dept/pub/doc/902/gpp/prods/mcrolref/win/mcrolref.hlp/z3514quote.htm" target="_blank"&gt;http://swwafs.unx.sas.com/dept/pub/doc/902/gpp/prods/mcrolref/win/mcrolref.hlp/z3514quote.htm&lt;/A&gt;&lt;BR /&gt;
&lt;BR /&gt;
The %quote function only masks single quotes when they occur in pairs, UNLESS you proceed one with a %.</description>
      <pubDate>Tue, 01 Dec 2009 14:29:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/a-bug-with-SAS-macro-SAS8-2-for-windows/m-p/11598#M1107</guid>
      <dc:creator>PatrickG</dc:creator>
      <dc:date>2009-12-01T14:29:34Z</dc:date>
    </item>
    <item>
      <title>Re: a bug with SAS macro?! (SAS8.2 for windows)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/a-bug-with-SAS-macro-SAS8-2-for-windows/m-p/11599#M1108</link>
      <description>Oops, that link above only works internally.  Try this one...&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;A href="http://support.sas.com/documentation/cdl/en/mcrolref/61885/HTML/default/z3514quote.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/mcrolref/61885/HTML/default/z3514quote.htm&lt;/A&gt;</description>
      <pubDate>Tue, 01 Dec 2009 14:33:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/a-bug-with-SAS-macro-SAS8-2-for-windows/m-p/11599#M1108</guid>
      <dc:creator>PatrickG</dc:creator>
      <dc:date>2009-12-01T14:33:21Z</dc:date>
    </item>
  </channel>
</rss>

