<?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: parallel processing in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/parallel-processing/m-p/513389#M138328</link>
    <description>&lt;P&gt;To really help you with a problem like this, we need to know more about what you want to do. There are a few macros here, which we don't know the purpose of. So describe you problem in more detail please.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The only thing that jumps into my eyes is this&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data extract; set data_extract; run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;There is absolutely no need to do this. You can simply use&amp;nbsp;&lt;STRONG&gt;data_extract&amp;nbsp;&lt;/STRONG&gt;data set directly in the SQL Procedure.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 15 Nov 2018 16:04:12 GMT</pubDate>
    <dc:creator>PeterClemmensen</dc:creator>
    <dc:date>2018-11-15T16:04:12Z</dc:date>
    <item>
      <title>parallel processing</title>
      <link>https://communities.sas.com/t5/SAS-Programming/parallel-processing/m-p/513383#M138324</link>
      <description>&lt;P&gt;Hi SAS users,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I wanted some help and tips on how to put this process in 'parallel processing'. I am passing 15 parts - each part has 5 million records in the data extract.. after that each process will run intermediate macro's and holds in the datasets and finally load data into Database. process is running over 2 days.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;how to put this process in parallel run by parts to speedup the process.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;%Macro Exec(part);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; %Let Cd=%Bquote('&amp;amp;part');&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;%data extract&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data extract; set data_extract; run;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;BR /&gt;Proc Sql Noprint; Select Count(*) Into:Obs From extract; Quit;&lt;BR /&gt;&lt;BR /&gt;%If %Eval(&amp;amp;Obs Gt 0) %Then %Do;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; %Loop( Obs=&amp;amp;Obs, Num_Per_Loop=1000, Input_Dataset=extract, Variable=id, Variable_Type=C, Macro_To_Call= data_pull&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Output_Dataset=All_data);&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;%Delete_Dataset(DS_Name=extract,Lib_Name=Work);&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;%macro1&lt;/P&gt;&lt;P&gt;%macro2&lt;/P&gt;&lt;P&gt;%macro3&lt;/P&gt;&lt;P&gt;%macro4&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;%hold_for_output(dsin=All_data,dsout=all_details);&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;BR /&gt;%End;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;%Mend Exec;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Thu, 15 Nov 2018 15:57:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/parallel-processing/m-p/513383#M138324</guid>
      <dc:creator>SASAna</dc:creator>
      <dc:date>2018-11-15T15:57:46Z</dc:date>
    </item>
    <item>
      <title>Re: parallel processing</title>
      <link>https://communities.sas.com/t5/SAS-Programming/parallel-processing/m-p/513389#M138328</link>
      <description>&lt;P&gt;To really help you with a problem like this, we need to know more about what you want to do. There are a few macros here, which we don't know the purpose of. So describe you problem in more detail please.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The only thing that jumps into my eyes is this&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data extract; set data_extract; run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;There is absolutely no need to do this. You can simply use&amp;nbsp;&lt;STRONG&gt;data_extract&amp;nbsp;&lt;/STRONG&gt;data set directly in the SQL Procedure.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Nov 2018 16:04:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/parallel-processing/m-p/513389#M138328</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2018-11-15T16:04:12Z</dc:date>
    </item>
    <item>
      <title>Re: parallel processing</title>
      <link>https://communities.sas.com/t5/SAS-Programming/parallel-processing/m-p/513393#M138330</link>
      <description>&lt;P&gt;This:&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;%Loop( Obs=&amp;amp;Obs, Num_Per_Loop=1000, Input_Dataset=extract, Variable=id, Variable_Type=C, Macro_To_Call= data_pull&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Output_Dataset=All_data);&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;Also doesn't seem ideal.&amp;nbsp; It looks like it is looping 1000 times, possibly creating datasets etc.&amp;nbsp; That would be time intesive, and some alterations to that process alone could save you a lot of resources.&amp;nbsp; I.e. one big dataset to process rather than lots of small ones.&lt;/P&gt;
&lt;P&gt;Can't tell anything else from that code.&lt;/P&gt;</description>
      <pubDate>Thu, 15 Nov 2018 16:08:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/parallel-processing/m-p/513393#M138330</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2018-11-15T16:08:51Z</dc:date>
    </item>
    <item>
      <title>Re: parallel processing</title>
      <link>https://communities.sas.com/t5/SAS-Programming/parallel-processing/m-p/513394#M138331</link>
      <description>&lt;P&gt;I could be wrong here, but I think you are barking up the wrong tree.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Just the little bit of code you have shown contains obvious inefficiencies.&amp;nbsp; Paying attention to them might eliminate a major portion of the run time, without the need for parallel processing&amp;nbsp; A couple of examples:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Why create the data set EXTRACT?&amp;nbsp; Why not just use the data set DATA_EXTRACT?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There are faster ways to get a count of all the observations in a data set, other than using COUNT(*).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It's just a guess, since we don't really see the contents of %MACRO1, ..., %MACRO5.&amp;nbsp; But I suspect it would be easy to cut out much of the time without parallel processing.&amp;nbsp; Even if you do find a parallel approach, it would still work much faster if the original programming were to run much faster.&lt;/P&gt;</description>
      <pubDate>Thu, 15 Nov 2018 16:11:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/parallel-processing/m-p/513394#M138331</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2018-11-15T16:11:09Z</dc:date>
    </item>
  </channel>
</rss>

