<?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 run macros in parallel in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/how-to-run-macros-in-parallel/m-p/796160#M255452</link>
    <description>&lt;P&gt;Not sure why you have phrased the question in terms of running macros.&amp;nbsp; Macros are just a way to generate SAS code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So what are the programs you want to run in parallel?&amp;nbsp; What do they do? How are they related to each other?&amp;nbsp; Are the all totally independent? If they are related how?&amp;nbsp; Does the results of running one impact the others?&amp;nbsp; Or are they just related by wanting to start from some common setup ? Or perhaps because you want to aggregate the results when they are done?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Do you have SAS/Connect licensed and installed?&lt;/P&gt;</description>
    <pubDate>Mon, 14 Feb 2022 22:37:38 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2022-02-14T22:37:38Z</dc:date>
    <item>
      <title>how to run macros in parallel</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-run-macros-in-parallel/m-p/796149#M255443</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have a program that contains multiple proc sql on macros, something like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;%macro m1000();&lt;/P&gt;
&lt;P&gt;proc sql;&lt;/P&gt;
&lt;P&gt;create table m1000 as&amp;nbsp;&lt;/P&gt;
&lt;P&gt;select * from test1000;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;%mend;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have around 70 macros like this and my question is, how could I run those 70 macros having 5 processes in parallel at the same time to run them (like a queue with only 5 threads) and as soon as one finishes, start running the next. I explored the systask command, but couldn't achieve to do this.&lt;/P&gt;</description>
      <pubDate>Mon, 14 Feb 2022 21:47:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-run-macros-in-parallel/m-p/796149#M255443</guid>
      <dc:creator>iscgonzalez</dc:creator>
      <dc:date>2022-02-14T21:47:39Z</dc:date>
    </item>
    <item>
      <title>Re: how to run macros in parallel</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-run-macros-in-parallel/m-p/796160#M255452</link>
      <description>&lt;P&gt;Not sure why you have phrased the question in terms of running macros.&amp;nbsp; Macros are just a way to generate SAS code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So what are the programs you want to run in parallel?&amp;nbsp; What do they do? How are they related to each other?&amp;nbsp; Are the all totally independent? If they are related how?&amp;nbsp; Does the results of running one impact the others?&amp;nbsp; Or are they just related by wanting to start from some common setup ? Or perhaps because you want to aggregate the results when they are done?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Do you have SAS/Connect licensed and installed?&lt;/P&gt;</description>
      <pubDate>Mon, 14 Feb 2022 22:37:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-run-macros-in-parallel/m-p/796160#M255452</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2022-02-14T22:37:38Z</dc:date>
    </item>
    <item>
      <title>Re: how to run macros in parallel</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-run-macros-in-parallel/m-p/796164#M255455</link>
      <description>&lt;P&gt;How is your SAS installation set up?&lt;/P&gt;
&lt;P&gt;Is it just Base SAS? EG? SAS Studio? Viya?&lt;/P&gt;
&lt;P&gt;Is it a server installation or desktop?&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;To check if you have SAS CONNECT run the following:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc product_status;run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I'm assuming you've already perused the LexJansen site for papers on parallel processing?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.lexjansen.com/search/searchresults.php?q=parallel%20processing%20sas" target="_blank"&gt;https://www.lexjansen.com/search/searchresults.php?q=parallel%20processing%20sas&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 14 Feb 2022 22:50:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-run-macros-in-parallel/m-p/796164#M255455</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2022-02-14T22:50:14Z</dc:date>
    </item>
    <item>
      <title>Re: how to run macros in parallel</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-run-macros-in-parallel/m-p/796168#M255459</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/58894"&gt;@iscgonzalez&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have a program that contains multiple proc sql on macros, something like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;%macro m1000();&lt;/P&gt;
&lt;P&gt;proc sql;&lt;/P&gt;
&lt;P&gt;create table m1000 as&amp;nbsp;&lt;/P&gt;
&lt;P&gt;select * from test1000;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;%mend;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have around 70 macros like this and my question is, how could I run those 70 macros having 5 processes in parallel at the same time to run them (like a queue with only 5 threads) and as soon as one finishes, start running the next. I explored the systask command, but couldn't achieve to do this.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;For that specific code you would be better off renaming the data set test1000 to m1000. It would be faster and if these sets are of any size, a whole lot faster, could be done in one call to proc data sets. Example:&lt;/P&gt;
&lt;PRE&gt;data junk1;
   x=3;
run;
data junk2;
  x=4;
run;

proc datasets library=work nolist nodetails;
   change Junk1 = New1
          Junk2 = New2
   ;

run;
quit;&lt;/PRE&gt;
&lt;P&gt;As an aside, the above approach won't let you accidentally overwrite an existing "new" data set if exists, which might be a good thing if this is getting turned loose on unsuspecting data.&lt;/P&gt;</description>
      <pubDate>Mon, 14 Feb 2022 23:28:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-run-macros-in-parallel/m-p/796168#M255459</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2022-02-14T23:28:32Z</dc:date>
    </item>
    <item>
      <title>Re: how to run macros in parallel</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-run-macros-in-parallel/m-p/796170#M255461</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/58894"&gt;@iscgonzalez&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;As rightly pointed out by&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159"&gt;@Tom&lt;/a&gt;&amp;nbsp;Macros are simply text replacement tokens.&lt;/P&gt;
&lt;P&gt;from your question, I see that you want to run the 70 segments of code in parallel.&lt;BR /&gt;if they can be run in parallel then SAS grid can be a good candidate.&amp;nbsp; &amp;nbsp;One should also factor the I/O requirements.&lt;/P&gt;</description>
      <pubDate>Mon, 14 Feb 2022 23:38:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-run-macros-in-parallel/m-p/796170#M255461</guid>
      <dc:creator>Sajid01</dc:creator>
      <dc:date>2022-02-14T23:38:32Z</dc:date>
    </item>
    <item>
      <title>Re: how to run macros in parallel</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-run-macros-in-parallel/m-p/796172#M255462</link>
      <description>&lt;P&gt;If you run your programs in batch mode then you you can run as many as you like at the same time as long as each runs independently of each other. No need for fancy splitting or SYSTASK.&lt;/P&gt;</description>
      <pubDate>Mon, 14 Feb 2022 23:46:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-run-macros-in-parallel/m-p/796172#M255462</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2022-02-14T23:46:20Z</dc:date>
    </item>
    <item>
      <title>Re: how to run macros in parallel</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-run-macros-in-parallel/m-p/796187#M255471</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Many ways to run things in parallel.&lt;/P&gt;
&lt;P&gt;My favorite V9.4 way is MP CONNECT. See below.&lt;/P&gt;
&lt;P&gt;(Let me know if you want to set up // CAS sessions in SAS VIYA 3.5+ and I will post, in this topic thread, some interesting blogs on // CAS sessions).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Base SAS + SAS/CONNECT - A simple method to generate load on any number of licensed cores&lt;BR /&gt;Posted 04-08-2021 05:46 AM | by SimonWilliams&lt;BR /&gt;&lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/Base-SAS-SAS-CONNECT-A-simple-method-to-generate-load-on-any/ta-p/732174" target="_blank"&gt;https://communities.sas.com/t5/SAS-Communities-Library/Base-SAS-SAS-CONNECT-A-simple-method-to-generate-load-on-any/ta-p/732174&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Running SAS programs in parallel using SAS/CONNECT®&lt;BR /&gt;By Leonid Batkhan on SAS Users January 13, 2021&lt;BR /&gt;&lt;A href="https://blogs.sas.com/content/sgf/2021/01/13/running-sas-programs-in-parallel-using-sas-connect/" target="_blank"&gt;https://blogs.sas.com/content/sgf/2021/01/13/running-sas-programs-in-parallel-using-sas-connect/&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Using SYSTASK and SAS macro loops for massively parallel processing&lt;BR /&gt;By Leonid Batkhan on SAS Users June 14, 2021&lt;BR /&gt;&lt;A href="https://blogs.sas.com/content/sgf/2021/06/14/using-systask-and-sas-macro-loops-for-massively-parallel-processing/" target="_blank"&gt;https://blogs.sas.com/content/sgf/2021/06/14/using-systask-and-sas-macro-loops-for-massively-parallel-processing/&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Koen&lt;/P&gt;</description>
      <pubDate>Tue, 15 Feb 2022 00:43:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-run-macros-in-parallel/m-p/796187#M255471</guid>
      <dc:creator>sbxkoenk</dc:creator>
      <dc:date>2022-02-15T00:43:35Z</dc:date>
    </item>
  </channel>
</rss>

