<?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 pass all the values of a table to a macro in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/how-to-pass-all-the-values-of-a-table-to-a-macro/m-p/149615#M29562</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;Thanks for your reply Xia Keshan,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;I am getting one error. Is there anything i am missing in below code?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data test;&lt;/P&gt;&lt;P&gt;set sashelp.class;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data name_list;&lt;/P&gt;&lt;P&gt;input names$;&lt;/P&gt;&lt;P&gt;cards;&lt;/P&gt;&lt;P&gt;Alfred&lt;/P&gt;&lt;P&gt;Henry&lt;/P&gt;&lt;P&gt;John&lt;/P&gt;&lt;P&gt;Ronald&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%macro mymac(a);&lt;/P&gt;&lt;P&gt;proc print data=test;&lt;/P&gt;&lt;P&gt;where name = &amp;amp;a;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;%mend;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data _null_;&lt;/P&gt;&lt;P&gt;set name_list;&lt;/P&gt;&lt;P&gt;call execute('%mymac('||names||')');&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 14 Dec 2014 12:06:09 GMT</pubDate>
    <dc:creator>kumarK</dc:creator>
    <dc:date>2014-12-14T12:06:09Z</dc:date>
    <item>
      <title>how to pass all the values of a table to a macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-pass-all-the-values-of-a-table-to-a-macro/m-p/149613#M29560</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i have a macro it will take input as a country and will give its population.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then i have another table list of all countries. I want to pass all these countries to that macro.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried below way i declared all the countries in a global variable and passed that variable&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;% let countries=india nepal......;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is not a efficient way. how can i pass all the values of another table in to that macro. Please throw some inputs.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 14 Dec 2014 11:12:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-pass-all-the-values-of-a-table-to-a-macro/m-p/149613#M29560</guid>
      <dc:creator>kumarK</dc:creator>
      <dc:date>2014-12-14T11:12:48Z</dc:date>
    </item>
    <item>
      <title>Re: how to pass all the values of a table to a macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-pass-all-the-values-of-a-table-to-a-macro/m-p/149614#M29561</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;proc sort data=have(keep=country) out=country nodupkey;by country;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data _null_;&lt;/P&gt;&lt;P&gt; set country;&lt;/P&gt;&lt;P&gt; call execute('%mymacro(country=' ||country|| ')' );&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Xia Keshan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 14 Dec 2014 11:21:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-pass-all-the-values-of-a-table-to-a-macro/m-p/149614#M29561</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2014-12-14T11:21:09Z</dc:date>
    </item>
    <item>
      <title>Re: how to pass all the values of a table to a macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-pass-all-the-values-of-a-table-to-a-macro/m-p/149615#M29562</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;Thanks for your reply Xia Keshan,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;I am getting one error. Is there anything i am missing in below code?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data test;&lt;/P&gt;&lt;P&gt;set sashelp.class;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data name_list;&lt;/P&gt;&lt;P&gt;input names$;&lt;/P&gt;&lt;P&gt;cards;&lt;/P&gt;&lt;P&gt;Alfred&lt;/P&gt;&lt;P&gt;Henry&lt;/P&gt;&lt;P&gt;John&lt;/P&gt;&lt;P&gt;Ronald&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%macro mymac(a);&lt;/P&gt;&lt;P&gt;proc print data=test;&lt;/P&gt;&lt;P&gt;where name = &amp;amp;a;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;%mend;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data _null_;&lt;/P&gt;&lt;P&gt;set name_list;&lt;/P&gt;&lt;P&gt;call execute('%mymac('||names||')');&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 14 Dec 2014 12:06:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-pass-all-the-values-of-a-table-to-a-macro/m-p/149615#M29562</guid>
      <dc:creator>kumarK</dc:creator>
      <dc:date>2014-12-14T12:06:09Z</dc:date>
    </item>
    <item>
      <title>Re: how to pass all the values of a table to a macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-pass-all-the-values-of-a-table-to-a-macro/m-p/149616#M29563</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yeah.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 12.727272033691406px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;%macro mymac(a);&lt;/P&gt;&lt;P style="font-size: 12.727272033691406px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;proc print data=test;&lt;/P&gt;&lt;P style="font-size: 12.727272033691406px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;where name = &lt;STRONG&gt;"&amp;amp;a";&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 12.727272033691406px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;run;&lt;/P&gt;&lt;P style="font-size: 12.727272033691406px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;%mend;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 14 Dec 2014 13:06:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-pass-all-the-values-of-a-table-to-a-macro/m-p/149616#M29563</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2014-12-14T13:06:13Z</dc:date>
    </item>
  </channel>
</rss>

