<?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: Running macros in sequence dynamically! in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Running-macros-in-sequence-dynamically/m-p/171427#M32962</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How are you calling them currently?&lt;/P&gt;&lt;P&gt;I believe the default behaviour is to wait for one process to finish before starting others, so unless you change something that's what will happen. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 23 May 2014 19:50:51 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2014-05-23T19:50:51Z</dc:date>
    <item>
      <title>Running macros in sequence dynamically!</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Running-macros-in-sequence-dynamically/m-p/171426#M32961</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello all;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have 8 macros to run in sequence. It is imperative that one completes before the other starts.&lt;/P&gt;&lt;P&gt;The macros would be run on 10 datasets with names that increase by 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I do this in a %Macro do loop while ensuring that one macro completes before the other starts?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Stan. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 May 2014 18:48:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Running-macros-in-sequence-dynamically/m-p/171426#M32961</guid>
      <dc:creator>lyton80</dc:creator>
      <dc:date>2014-05-23T18:48:38Z</dc:date>
    </item>
    <item>
      <title>Re: Running macros in sequence dynamically!</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Running-macros-in-sequence-dynamically/m-p/171427#M32962</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How are you calling them currently?&lt;/P&gt;&lt;P&gt;I believe the default behaviour is to wait for one process to finish before starting others, so unless you change something that's what will happen. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 May 2014 19:50:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Running-macros-in-sequence-dynamically/m-p/171427#M32962</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2014-05-23T19:50:51Z</dc:date>
    </item>
    <item>
      <title>Re: Running macros in sequence dynamically!</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Running-macros-in-sequence-dynamically/m-p/171428#M32963</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Statements entered in SAS are executed sequentially, so you shouldn't have any real concerns about the process flow (of course there are exceptions, but I would not believe any of them apply here at a novice level).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*list the macro's sequentially;&lt;/P&gt;&lt;P&gt;%mymacro1&lt;/P&gt;&lt;P&gt;%mymacro2&lt;/P&gt;&lt;P&gt;%mymacro3&lt;/P&gt;&lt;P&gt;%myfourthmacro&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;%mymacro10&lt;/P&gt;&lt;P&gt;%myothermacro&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*call macro's from a macro with same name plus numerical suffix;&lt;/P&gt;&lt;P&gt;%macro mymacrocaller;&lt;/P&gt;&lt;P&gt;%do i = 1 %to 10;&lt;/P&gt;&lt;P&gt;&amp;nbsp; %let lmacname = mymacro&amp;amp;i;&lt;/P&gt;&lt;P&gt;&amp;nbsp; %&amp;amp;lmacname&lt;/P&gt;&lt;P&gt;%end;&lt;/P&gt;&lt;P&gt;%mend;&lt;/P&gt;&lt;P&gt;%mymacrocaller&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*call list of macro's when names are different;&lt;/P&gt;&lt;P&gt;%macro mymaccall;&lt;/P&gt;&lt;P&gt;%let maclist=mymac1 secondone lastone;&lt;/P&gt;&lt;P&gt;%do i = 1 %to %sysfunc(countw(&amp;amp;maclist));&lt;/P&gt;&lt;P&gt;%let lmacn=%scan(&amp;amp;maclist,&amp;amp;i);&lt;/P&gt;&lt;P&gt;%&amp;amp;lmacn&lt;/P&gt;&lt;P&gt;%end;&lt;/P&gt;&lt;P&gt;%mend;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*call list of macro's from a datastep;&lt;/P&gt;&lt;P&gt;data _null_;&lt;/P&gt;&lt;P&gt;infile cards;&lt;/P&gt;&lt;P&gt;input macname $;&lt;/P&gt;&lt;P&gt;call execute(cats('%nrstr(%',macname,')'));&lt;/P&gt;&lt;P&gt;cards4;&lt;/P&gt;&lt;P&gt;mymacro1&lt;/P&gt;&lt;P&gt;foobar&lt;/P&gt;&lt;P&gt;lasagna&lt;/P&gt;&lt;P&gt;;;;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There are plenty of other ways to do it as well, but the exact problem is not completely apparent from your question.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 May 2014 22:04:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Running-macros-in-sequence-dynamically/m-p/171428#M32963</guid>
      <dc:creator>FriedEgg</dc:creator>
      <dc:date>2014-05-23T22:04:15Z</dc:date>
    </item>
  </channel>
</rss>

