<?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: run same macro many time with different parameters in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/run-same-macro-many-time-with-different-parameters/m-p/95587#M20126</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I like Barry's 1st answer &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://communities.sas.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&amp;nbsp; and below is how you would do for his second suggestion.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;get the list of variables that needs to be passed to the macro and send them all to a macro variable separating them by a special character, say LIST for example: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the macro variable LIST would be like this A*B*C*D*............*Z&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now loop it through all the parameters&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%do i=1 %to 50;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; %let param=%scan(&amp;amp;list,&amp;amp;i,'*');&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; %CT(&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;param1=data, param2=inv, param3=&amp;amp;param);&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;%end;&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;hope this helps.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 10 Dec 2012 21:43:22 GMT</pubDate>
    <dc:creator>sasjourney</dc:creator>
    <dc:date>2012-12-10T21:43:22Z</dc:date>
    <item>
      <title>run same macro many time with different parameters</title>
      <link>https://communities.sas.com/t5/SAS-Programming/run-same-macro-many-time-with-different-parameters/m-p/95585#M20124</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;I need to run the same macro CT 50 times changing just one of the several parameters. A, B, C...... are 50 variables that need to be replaced in the call macro.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%CT(param1=data, param2=inv, param3=A);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%CT(param1=data, param2=inv, param3=B);&lt;/P&gt;&lt;P&gt;%CT(param1=data, param2=inv, param3=C);&lt;/P&gt;&lt;P&gt;.....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Dec 2012 20:57:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/run-same-macro-many-time-with-different-parameters/m-p/95585#M20124</guid>
      <dc:creator>jojo</dc:creator>
      <dc:date>2012-12-10T20:57:44Z</dc:date>
    </item>
    <item>
      <title>Re: run same macro many time with different parameters</title>
      <link>https://communities.sas.com/t5/SAS-Programming/run-same-macro-many-time-with-different-parameters/m-p/95586#M20125</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Copy and paste works well &lt;img id="smileywink" class="emoticon emoticon-smileywink" src="https://communities.sas.com/i/smilies/16x16_smiley-wink.png" alt="Smiley Wink" title="Smiley Wink" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or consider using a macro do / while loop&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Dec 2012 21:16:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/run-same-macro-many-time-with-different-parameters/m-p/95586#M20125</guid>
      <dc:creator>twocanbazza</dc:creator>
      <dc:date>2012-12-10T21:16:22Z</dc:date>
    </item>
    <item>
      <title>Re: run same macro many time with different parameters</title>
      <link>https://communities.sas.com/t5/SAS-Programming/run-same-macro-many-time-with-different-parameters/m-p/95587#M20126</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I like Barry's 1st answer &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://communities.sas.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&amp;nbsp; and below is how you would do for his second suggestion.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;get the list of variables that needs to be passed to the macro and send them all to a macro variable separating them by a special character, say LIST for example: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the macro variable LIST would be like this A*B*C*D*............*Z&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now loop it through all the parameters&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%do i=1 %to 50;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; %let param=%scan(&amp;amp;list,&amp;amp;i,'*');&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; %CT(&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;param1=data, param2=inv, param3=&amp;amp;param);&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;%end;&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;hope this helps.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Dec 2012 21:43:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/run-same-macro-many-time-with-different-parameters/m-p/95587#M20126</guid>
      <dc:creator>sasjourney</dc:creator>
      <dc:date>2012-12-10T21:43:22Z</dc:date>
    </item>
    <item>
      <title>Re: run same macro many time with different parameters</title>
      <link>https://communities.sas.com/t5/SAS-Programming/run-same-macro-many-time-with-different-parameters/m-p/95588#M20127</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can have you parameters stored in a SAS table, and call the macro by using call execute instead.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Dec 2012 21:51:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/run-same-macro-many-time-with-different-parameters/m-p/95588#M20127</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2012-12-10T21:51:15Z</dc:date>
    </item>
  </channel>
</rss>

