<?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: Filter for two variable in macros in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Filter-for-two-variable-in-macros/m-p/590714#M15083</link>
    <description>&lt;P&gt;Agreeing with &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/11562"&gt;@Kurt_Bremser&lt;/a&gt; , you have to create working SAS code without macro variables first. If your code doesn't work properly without macro variables, then it will not work properly with macro variables.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, you rarely need to have the values of macro variables enclosed in quotes.&lt;/P&gt;</description>
    <pubDate>Sun, 22 Sep 2019 11:20:34 GMT</pubDate>
    <dc:creator>PaigeMiller</dc:creator>
    <dc:date>2019-09-22T11:20:34Z</dc:date>
    <item>
      <title>Filter for two variable in macros</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Filter-for-two-variable-in-macros/m-p/590704#M15076</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%macro t1(a,b,c);
data &amp;amp;a;
set &amp;amp;a	;
where Type eq (&amp;amp;c and Origin &amp;amp;c);
run;
%mend t1;

%t1(dsn,sashelp.cars,	'Sedan' &amp;amp; 'Asia');&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;why error please advise me&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 22 Sep 2019 06:53:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Filter-for-two-variable-in-macros/m-p/590704#M15076</guid>
      <dc:creator>BrahmanandaRao</dc:creator>
      <dc:date>2019-09-22T06:53:23Z</dc:date>
    </item>
    <item>
      <title>Re: Filter for two variable in macros</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Filter-for-two-variable-in-macros/m-p/590708#M15078</link>
      <description>&lt;P&gt;Rule #1 of macro development: start with working SAS code.&lt;/P&gt;
&lt;P&gt;By manually resolving your macro parameters, I get this code:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data dsn;
set dsn;
where Type eq ('Sedan' &amp;amp; 'Asia' and Origin 'Sedan' &amp;amp; 'Asia');
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The where condition is very obviously invalid syntax. Fix that in the data step code, and&amp;nbsp;&lt;EM&gt;then&lt;/EM&gt; start to make it dynamic by proper use of macro variables.&lt;/P&gt;</description>
      <pubDate>Sun, 22 Sep 2019 08:41:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Filter-for-two-variable-in-macros/m-p/590708#M15078</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2019-09-22T08:41:17Z</dc:date>
    </item>
    <item>
      <title>Re: Filter for two variable in macros</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Filter-for-two-variable-in-macros/m-p/590714#M15083</link>
      <description>&lt;P&gt;Agreeing with &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/11562"&gt;@Kurt_Bremser&lt;/a&gt; , you have to create working SAS code without macro variables first. If your code doesn't work properly without macro variables, then it will not work properly with macro variables.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, you rarely need to have the values of macro variables enclosed in quotes.&lt;/P&gt;</description>
      <pubDate>Sun, 22 Sep 2019 11:20:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Filter-for-two-variable-in-macros/m-p/590714#M15083</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2019-09-22T11:20:34Z</dc:date>
    </item>
  </channel>
</rss>

