<?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: sas macros in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/sas-macros/m-p/609134#M177327</link>
    <description>&lt;P&gt;It is not clear what you are asking for.&amp;nbsp; A simple example of what you have and what you want to get would help.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you are looking to subset your data then a WHERE statement (not a macro or a macro variable) is what you want.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You could use a macro variable to help you generate the WHERE statement.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let state_list = 'NY' 'CT' 'DE' ;
data want;
  set have;
  where state in (&amp;amp;state_list);
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;An actual macro is not needed unless you need to do something more complex.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 03 Dec 2019 17:53:04 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2019-12-03T17:53:04Z</dc:date>
    <item>
      <title>sas macros</title>
      <link>https://communities.sas.com/t5/SAS-Programming/sas-macros/m-p/609130#M177324</link>
      <description>&lt;P&gt;Suppose there&amp;nbsp; is a table and in table ,a column named state has 28 different values.I want to call 5 states names, for this i want to write a single macro which will call those 5 states.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kindly help.&lt;/P&gt;</description>
      <pubDate>Tue, 03 Dec 2019 17:45:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/sas-macros/m-p/609130#M177324</guid>
      <dc:creator>asuman</dc:creator>
      <dc:date>2019-12-03T17:45:17Z</dc:date>
    </item>
    <item>
      <title>Re: sas macros</title>
      <link>https://communities.sas.com/t5/SAS-Programming/sas-macros/m-p/609133#M177326</link>
      <description>&lt;P&gt;You can use the "in" operator in where conditions, no macro needed.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To illustrate your issue, post example data in a data step with datalines (use the "little running man" icon for posting code), and what you expect to get out of it.&lt;/P&gt;</description>
      <pubDate>Tue, 03 Dec 2019 17:52:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/sas-macros/m-p/609133#M177326</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2019-12-03T17:52:54Z</dc:date>
    </item>
    <item>
      <title>Re: sas macros</title>
      <link>https://communities.sas.com/t5/SAS-Programming/sas-macros/m-p/609134#M177327</link>
      <description>&lt;P&gt;It is not clear what you are asking for.&amp;nbsp; A simple example of what you have and what you want to get would help.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you are looking to subset your data then a WHERE statement (not a macro or a macro variable) is what you want.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You could use a macro variable to help you generate the WHERE statement.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let state_list = 'NY' 'CT' 'DE' ;
data want;
  set have;
  where state in (&amp;amp;state_list);
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;An actual macro is not needed unless you need to do something more complex.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Dec 2019 17:53:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/sas-macros/m-p/609134#M177327</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2019-12-03T17:53:04Z</dc:date>
    </item>
    <item>
      <title>Re: sas macros</title>
      <link>https://communities.sas.com/t5/SAS-Programming/sas-macros/m-p/609136#M177329</link>
      <description>Thanks Tom,This is what i was looking for.</description>
      <pubDate>Tue, 03 Dec 2019 17:55:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/sas-macros/m-p/609136#M177329</guid>
      <dc:creator>asuman</dc:creator>
      <dc:date>2019-12-03T17:55:32Z</dc:date>
    </item>
  </channel>
</rss>

