<?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: How to resolve for % in the macro statement? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-resolve-for-in-the-macro-statement/m-p/782207#M249367</link>
    <description>Using CONTAINS operator instead.&lt;BR /&gt;&lt;BR /&gt;where upcase(type_new) contains "&amp;amp;ty."</description>
    <pubDate>Wed, 24 Nov 2021 12:36:30 GMT</pubDate>
    <dc:creator>Ksharp</dc:creator>
    <dc:date>2021-11-24T12:36:30Z</dc:date>
    <item>
      <title>How to resolve for % in the macro statement?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-resolve-for-in-the-macro-statement/m-p/782170#M249339</link>
      <description>&lt;P&gt;%macro car_type(ty=);&lt;BR /&gt;proc sql;&lt;BR /&gt;create table tmp as&lt;BR /&gt;select *&lt;BR /&gt;from cars&lt;BR /&gt;where upcase(type_new) like "&lt;FONT color="#FF0000"&gt;%&amp;amp;ty.%&lt;/FONT&gt;"&lt;BR /&gt;;quit;&lt;BR /&gt;%mend;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The part highlighted in red triggers an error. How to get around this? Please help. Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Nov 2021 09:49:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-resolve-for-in-the-macro-statement/m-p/782170#M249339</guid>
      <dc:creator>Sameer440909</dc:creator>
      <dc:date>2021-11-24T09:49:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to resolve for % in the macro statement?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-resolve-for-in-the-macro-statement/m-p/782171#M249340</link>
      <description>&lt;P&gt;Wrap the % in the %Nrstr Macro Quoting Function&lt;/P&gt;</description>
      <pubDate>Wed, 24 Nov 2021 09:58:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-resolve-for-in-the-macro-statement/m-p/782171#M249340</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2021-11-24T09:58:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to resolve for % in the macro statement?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-resolve-for-in-the-macro-statement/m-p/782175#M249344</link>
      <description>&lt;P&gt;Thanks for the replying. I tried but empty data is generated.&lt;/P&gt;&lt;P&gt;Would be very helpful if you can show the exact syntax.&lt;/P&gt;&lt;P&gt;This is how I have written based on your suggestion,&lt;/P&gt;&lt;P&gt;where upcase(type_new) like&lt;FONT color="#FF0000"&gt; "%nrstr(% &amp;amp;ty.%)"&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Nov 2021 10:24:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-resolve-for-in-the-macro-statement/m-p/782175#M249344</guid>
      <dc:creator>Sameer440909</dc:creator>
      <dc:date>2021-11-24T10:24:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to resolve for % in the macro statement?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-resolve-for-in-the-macro-statement/m-p/782176#M249345</link>
      <description>&lt;P&gt;Separate the parts, so no macro resolution is tried:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%macro car_type(ty=);
proc sql;
create table tmp as
select *
from sashelp.cars
where upcase(type) like "%"!!"&amp;amp;ty."!!"%"
;
quit;
%mend;

%car_type(ty=SUV)&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 24 Nov 2021 10:27:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-resolve-for-in-the-macro-statement/m-p/782176#M249345</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2021-11-24T10:27:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to resolve for % in the macro statement?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-resolve-for-in-the-macro-statement/m-p/782179#M249348</link>
      <description>Thank you so much &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/11562"&gt;@Kurt_Bremser&lt;/a&gt;. The solution worked fine. Thanks again</description>
      <pubDate>Wed, 24 Nov 2021 10:34:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-resolve-for-in-the-macro-statement/m-p/782179#M249348</guid>
      <dc:creator>Sameer440909</dc:creator>
      <dc:date>2021-11-24T10:34:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to resolve for % in the macro statement?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-resolve-for-in-the-macro-statement/m-p/782207#M249367</link>
      <description>Using CONTAINS operator instead.&lt;BR /&gt;&lt;BR /&gt;where upcase(type_new) contains "&amp;amp;ty."</description>
      <pubDate>Wed, 24 Nov 2021 12:36:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-resolve-for-in-the-macro-statement/m-p/782207#M249367</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2021-11-24T12:36:30Z</dc:date>
    </item>
  </channel>
</rss>

