<?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 sas macro1 in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/sas-macro1/m-p/241489#M308935</link>
    <description>&lt;P&gt;&lt;BR /&gt;%macro ab(x);&lt;/P&gt;&lt;P&gt;proc print data=test1 ;where rating in(&amp;amp;x);run;&lt;/P&gt;&lt;P&gt;%mend;&lt;BR /&gt;%ab(2,3,4)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;here i'm getting error that more positional parameters found but if i write&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;proc print data=test1 ;where rating in(2,3,4);run;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;i'm getting the desired output.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;amp;x also doing the same then y error is cmng?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I think after resolving macro variable to (2,3,4) it should work like a normal sas program.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Please explain how the macro processor is processing these values.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sun, 03 Jan 2016 06:05:23 GMT</pubDate>
    <dc:creator>pawandh</dc:creator>
    <dc:date>2016-01-03T06:05:23Z</dc:date>
    <item>
      <title>sas macro1</title>
      <link>https://communities.sas.com/t5/SAS-Programming/sas-macro1/m-p/241489#M308935</link>
      <description>&lt;P&gt;&lt;BR /&gt;%macro ab(x);&lt;/P&gt;&lt;P&gt;proc print data=test1 ;where rating in(&amp;amp;x);run;&lt;/P&gt;&lt;P&gt;%mend;&lt;BR /&gt;%ab(2,3,4)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;here i'm getting error that more positional parameters found but if i write&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;proc print data=test1 ;where rating in(2,3,4);run;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;i'm getting the desired output.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;amp;x also doing the same then y error is cmng?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I think after resolving macro variable to (2,3,4) it should work like a normal sas program.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Please explain how the macro processor is processing these values.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 03 Jan 2016 06:05:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/sas-macro1/m-p/241489#M308935</guid>
      <dc:creator>pawandh</dc:creator>
      <dc:date>2016-01-03T06:05:23Z</dc:date>
    </item>
    <item>
      <title>Re: sas macro1</title>
      <link>https://communities.sas.com/t5/SAS-Programming/sas-macro1/m-p/241494#M308936</link>
      <description>The commas between the values make the macro compiler treat them as separate parameters. &lt;BR /&gt;In your case the simplest is to skip the commas since IN () can handle blanks as a list separator.</description>
      <pubDate>Sat, 02 Jan 2016 07:36:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/sas-macro1/m-p/241494#M308936</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2016-01-02T07:36:08Z</dc:date>
    </item>
    <item>
      <title>Re: sas macro1</title>
      <link>https://communities.sas.com/t5/SAS-Programming/sas-macro1/m-p/241525#M308937</link>
      <description>Please mask the commas using the %str while compilation and you could avoid the error. Try calling the macro as below &lt;BR /&gt;&lt;BR /&gt;%ab(%str(2,3,4))</description>
      <pubDate>Sun, 03 Jan 2016 02:06:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/sas-macro1/m-p/241525#M308937</guid>
      <dc:creator>Jagadishkatam</dc:creator>
      <dc:date>2016-01-03T02:06:32Z</dc:date>
    </item>
    <item>
      <title>Re: sas macro1</title>
      <link>https://communities.sas.com/t5/SAS-Programming/sas-macro1/m-p/241535#M308939</link>
      <description>&lt;P&gt;if i write&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc print data=test;&lt;/P&gt;&lt;P&gt;where rating in (2,3,4);run;&lt;/P&gt;&lt;P&gt;i get the desired output.&lt;/P&gt;&lt;P&gt;But instead of 2,3,4 if i write a macro variable which has the sam values(2,3,4) then it is not showing the desired result??&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;macro resolving to 2,3,4 only.so it should print the observations.&lt;/P&gt;</description>
      <pubDate>Sun, 03 Jan 2016 06:03:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/sas-macro1/m-p/241535#M308939</guid>
      <dc:creator>pawandh</dc:creator>
      <dc:date>2016-01-03T06:03:03Z</dc:date>
    </item>
    <item>
      <title>Re: sas macro1</title>
      <link>https://communities.sas.com/t5/SAS-Programming/sas-macro1/m-p/241539#M308940</link>
      <description>Hope you tried %ab(%str(2,3,4))</description>
      <pubDate>Sun, 03 Jan 2016 06:56:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/sas-macro1/m-p/241539#M308940</guid>
      <dc:creator>Jagadishkatam</dc:creator>
      <dc:date>2016-01-03T06:56:03Z</dc:date>
    </item>
  </channel>
</rss>

