<?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: Apparent invocation of macro not resolved. in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Apparent-invocation-of-macro-not-resolved/m-p/301282#M270389</link>
    <description>The answers works perfectly. Thank you so much for your help.</description>
    <pubDate>Wed, 28 Sep 2016 13:52:25 GMT</pubDate>
    <dc:creator>lionking19063</dc:creator>
    <dc:date>2016-09-28T13:52:25Z</dc:date>
    <item>
      <title>Apparent invocation of macro not resolved.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Apparent-invocation-of-macro-not-resolved/m-p/301261#M270384</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I got an error message when the following code were submitted. It says "Apparent invocation of macro not resolved.". Does anyone hvae any insight? Thank you.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt;create table a as&lt;/P&gt;&lt;P&gt;select distinct *&lt;/P&gt;&lt;P&gt;from test data&lt;/P&gt;&lt;P&gt;where lower(last_name) like "%&amp;amp;proj%";&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Sep 2016 13:34:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Apparent-invocation-of-macro-not-resolved/m-p/301261#M270384</guid>
      <dc:creator>lionking19063</dc:creator>
      <dc:date>2016-09-28T13:34:24Z</dc:date>
    </item>
    <item>
      <title>Re: Apparent invocation of macro not resolved.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Apparent-invocation-of-macro-not-resolved/m-p/301270#M270385</link>
      <description>&lt;P&gt;SAS is looking for a macro because you have %proj&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;its a warning not an error though?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can you use the find or index function instead if you need to avoid the warning?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Sep 2016 13:41:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Apparent-invocation-of-macro-not-resolved/m-p/301270#M270385</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-09-28T13:41:13Z</dc:date>
    </item>
    <item>
      <title>Re: Apparent invocation of macro not resolved.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Apparent-invocation-of-macro-not-resolved/m-p/301275#M270386</link>
      <description>&lt;P&gt;It is this code line:&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;where lower(last_name) like "%&amp;amp;proj%";&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;If you use macro constructs = % or &amp;amp; witihin double quotes, then then macro preprocessor is invoked. &amp;nbsp;Now it will resolve &amp;amp;proj. to its value, and then look for a macro called %&amp;lt;proj value&amp;gt;. &amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Use SAS functions to search for a string - index() for instance. &amp;nbsp;Or avoid using macro paramters, is there any reason why &amp;amp;proj is used?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Sep 2016 13:46:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Apparent-invocation-of-macro-not-resolved/m-p/301275#M270386</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2016-09-28T13:46:00Z</dc:date>
    </item>
    <item>
      <title>Re: Apparent invocation of macro not resolved.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Apparent-invocation-of-macro-not-resolved/m-p/301278#M270387</link>
      <description>&lt;P&gt;Probably the easiest is to build up the string with&amp;nbsp;the % in it in a way that does not trigger the macro processor.&lt;/P&gt;
&lt;P&gt;Here is one way.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let name=fred;
proc sql noprint;
create table a as
 select distinct *
 from sashelp.class
 where lower(name) like '%'||"&amp;amp;name"||'%'
;
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Sep 2016 13:49:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Apparent-invocation-of-macro-not-resolved/m-p/301278#M270387</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2016-09-28T13:49:31Z</dc:date>
    </item>
    <item>
      <title>Re: Apparent invocation of macro not resolved.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Apparent-invocation-of-macro-not-resolved/m-p/301279#M270388</link>
      <description>&lt;P&gt;I used index as you mentioned, it works fine. Just wonder if there is a way to fix the error in the existing SAS codes instead of trying another way. Thanks.&lt;/P&gt;</description>
      <pubDate>Wed, 28 Sep 2016 14:56:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Apparent-invocation-of-macro-not-resolved/m-p/301279#M270388</guid>
      <dc:creator>lionking19063</dc:creator>
      <dc:date>2016-09-28T14:56:01Z</dc:date>
    </item>
    <item>
      <title>Re: Apparent invocation of macro not resolved.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Apparent-invocation-of-macro-not-resolved/m-p/301282#M270389</link>
      <description>The answers works perfectly. Thank you so much for your help.</description>
      <pubDate>Wed, 28 Sep 2016 13:52:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Apparent-invocation-of-macro-not-resolved/m-p/301282#M270389</guid>
      <dc:creator>lionking19063</dc:creator>
      <dc:date>2016-09-28T13:52:25Z</dc:date>
    </item>
  </channel>
</rss>

