<?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 Apparent invocation of macro ABC not resolved in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Apparent-invocation-of-macro-ABC-not-resolved/m-p/645938#M193152</link>
    <description>&lt;P&gt;Hey guys,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm unable to understand the reason behind this error and how do I solve it?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the code:&lt;/P&gt;&lt;P&gt;%let a= %str(abc|abc);&lt;/P&gt;&lt;P&gt;%let sep= %str();&lt;/P&gt;&lt;P&gt;%let b= %;&lt;/P&gt;&lt;P&gt;%let c= %sysfunc(CATX(&amp;amp;sep.,&amp;amp;b.,&amp;amp;a.,&amp;amp;b.));&lt;/P&gt;&lt;P&gt;%put &amp;amp;c.;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My goal is to take an input in variable 'a' (say abc|abc) and give an output such a way that it looks like '%abc|abc%'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 07 May 2020 16:08:43 GMT</pubDate>
    <dc:creator>sam_sas2</dc:creator>
    <dc:date>2020-05-07T16:08:43Z</dc:date>
    <item>
      <title>Apparent invocation of macro ABC not resolved</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Apparent-invocation-of-macro-ABC-not-resolved/m-p/645938#M193152</link>
      <description>&lt;P&gt;Hey guys,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm unable to understand the reason behind this error and how do I solve it?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the code:&lt;/P&gt;&lt;P&gt;%let a= %str(abc|abc);&lt;/P&gt;&lt;P&gt;%let sep= %str();&lt;/P&gt;&lt;P&gt;%let b= %;&lt;/P&gt;&lt;P&gt;%let c= %sysfunc(CATX(&amp;amp;sep.,&amp;amp;b.,&amp;amp;a.,&amp;amp;b.));&lt;/P&gt;&lt;P&gt;%put &amp;amp;c.;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My goal is to take an input in variable 'a' (say abc|abc) and give an output such a way that it looks like '%abc|abc%'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 07 May 2020 16:08:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Apparent-invocation-of-macro-ABC-not-resolved/m-p/645938#M193152</guid>
      <dc:creator>sam_sas2</dc:creator>
      <dc:date>2020-05-07T16:08:43Z</dc:date>
    </item>
    <item>
      <title>Re: Apparent invocation of macro ABC not resolved</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Apparent-invocation-of-macro-ABC-not-resolved/m-p/645951#M193156</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let a = %str(abc|abc);
%let c = %nrstr(%%)&amp;amp;a%nrstr(%%);
%put &amp;amp;=c;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Why %nrstr(%%)? The %NRSTR() function masks the meaning of the % sign, otherwise SAS thinks the % sign is invoking a macro. Why two %% inside the %NRSTR() function? Two percent signs are treated as one, as in the example in the &lt;A href="https://documentation.sas.com/?cdcId=pgmmvacdc&amp;amp;cdcVersion=9.4&amp;amp;docsetId=mcrolref&amp;amp;docsetTarget=n09tblrxldh8k0n1kt6dkj3xlxug.htm&amp;amp;locale=en" target="_self"&gt;documentation&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There's never a need to use CATX (or CAT) to concatenate macro variables. Just stick them together as above.&lt;/P&gt;</description>
      <pubDate>Thu, 07 May 2020 17:07:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Apparent-invocation-of-macro-ABC-not-resolved/m-p/645951#M193156</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-05-07T17:07:34Z</dc:date>
    </item>
  </channel>
</rss>

