<?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: Passing values to Macro in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Passing-values-to-Macro/m-p/168188#M32332</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;got it resolve..thanks...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 07 Jul 2014 04:32:35 GMT</pubDate>
    <dc:creator>rkumar23</dc:creator>
    <dc:date>2014-07-07T04:32:35Z</dc:date>
    <item>
      <title>Passing values to Macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Passing-values-to-Macro/m-p/168187#M32331</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to achieve something as below....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a Main macro say with MAIN1&amp;nbsp; and within MAIN1 i have another macro with MAIN2 and Both MAIN1 &amp;amp; MAIN2 need to have certain values to be passed when they run so I have below in the coding.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%Macro main1(X1,X2,X3,X4);&lt;/P&gt;&lt;P&gt;Data xx;&lt;/P&gt;&lt;P&gt;%Put "&amp;amp;X1";&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%MAIN2(&amp;amp;X2,&amp;amp;X3,&amp;amp;X4);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%Mend main1;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now I am running above macro as below:&lt;/P&gt;&lt;P&gt;%Main1(x1=1,x2=6,x3=8,x4=10);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;with above run it shows me error ERROR: MORE POSITIONAL PARAMETERS FOUND THAN DEFINED.&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;Any idea how we pass the variables to MAIN2 ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Jul 2014 04:15:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Passing-values-to-Macro/m-p/168187#M32331</guid>
      <dc:creator>rkumar23</dc:creator>
      <dc:date>2014-07-07T04:15:48Z</dc:date>
    </item>
    <item>
      <title>Re: Passing values to Macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Passing-values-to-Macro/m-p/168188#M32332</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;got it resolve..thanks...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Jul 2014 04:32:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Passing-values-to-Macro/m-p/168188#M32332</guid>
      <dc:creator>rkumar23</dc:creator>
      <dc:date>2014-07-07T04:32:35Z</dc:date>
    </item>
    <item>
      <title>Re: Passing values to Macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Passing-values-to-Macro/m-p/168189#M32333</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;You mixed up two ways of defining macro variable(parameter&amp;nbsp; macro variable&amp;nbsp; and&amp;nbsp; position macro variable).&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;&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;%Macro main1(X1&lt;STRONG&gt;=&lt;/STRONG&gt;,X2=,X3=,X4=);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: xia keshan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Jul 2014 12:38:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Passing-values-to-Macro/m-p/168189#M32333</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2014-07-07T12:38:10Z</dc:date>
    </item>
  </channel>
</rss>

