<?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 with Loops in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Parallel-processing-with-Loops/m-p/773519#M245745</link>
    <description>&lt;P&gt;Why do you need to create 100 datasets single-observations datasets?&amp;nbsp; Why not make one dataset with 100 observations, and a new variable, say &lt;EM&gt;&lt;STRONG&gt;I_GROUP&lt;/STRONG&gt;&lt;/EM&gt;, corresponding to the &lt;EM&gt;&lt;STRONG&gt;DS2_&amp;amp;i&lt;/STRONG&gt;&lt;/EM&gt; dataset names?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data ds2_all;
  set ds1 (where=(a=1) obs=100);
  i_group=_n_;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Note that the where filter is outsourced to the data set engine, prior to delivering observations to the data step.&amp;nbsp; Therefore the _N_ variable (i.e. the iteration number of the data step) is counting only the a=1 observations.&amp;nbsp; So &lt;EM&gt;&lt;STRONG&gt;i_group&lt;/STRONG&gt;&lt;/EM&gt; is equivalent to your &lt;EM&gt;&lt;STRONG&gt;DS2_&amp;amp;i&lt;/STRONG&gt;&lt;/EM&gt; dataset names.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And like&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/16961"&gt;@ChrisNZ&lt;/a&gt;,&amp;nbsp; I don't see any evident need to do parallel processing, especially for this particular task.&lt;/P&gt;</description>
    <pubDate>Tue, 12 Oct 2021 01:51:36 GMT</pubDate>
    <dc:creator>mkeintz</dc:creator>
    <dc:date>2021-10-12T01:51:36Z</dc:date>
    <item>
      <title>Parallel processing with Loops</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Parallel-processing-with-Loops/m-p/773457#M245714</link>
      <description>&lt;P&gt;Hi All.,&lt;/P&gt;&lt;P&gt;I am trying to find out if there is a way to process the do loop in parallel.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Example:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data ds1;&lt;/P&gt;&lt;P&gt;&amp;nbsp; set sample(where=(a=1));&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;%do i = 1 %to 100;&lt;/P&gt;&lt;P&gt;&amp;nbsp; data ds2_&amp;amp;i;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; set ds1(firstobs=&amp;amp;i obs=&amp;amp;i);&lt;/P&gt;&lt;P&gt;&amp;nbsp; run;&lt;/P&gt;&lt;P&gt;%end;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Instead of running one loop after another., I want the data step (ds2_&amp;amp;i) to run in parallel and process 100 datasteps at the same time.&lt;/P&gt;&lt;P&gt;Please let me the best possible way to run this in parallel.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you and appreciate your help.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Oct 2021 18:47:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Parallel-processing-with-Loops/m-p/773457#M245714</guid>
      <dc:creator>prad001</dc:creator>
      <dc:date>2021-10-11T18:47:06Z</dc:date>
    </item>
    <item>
      <title>Re: Parallel processing with Loops</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Parallel-processing-with-Loops/m-p/773461#M245715</link>
      <description>&lt;P&gt;To run a 100 DATA steps at the same time would require 100 separate SAS sessions. This is not a realistic possibility. It would help if you explained the processing problem you have rather than just describing the solution you want.&lt;/P&gt;</description>
      <pubDate>Mon, 11 Oct 2021 19:00:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Parallel-processing-with-Loops/m-p/773461#M245715</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2021-10-11T19:00:28Z</dc:date>
    </item>
    <item>
      <title>Re: Parallel processing with Loops</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Parallel-processing-with-Loops/m-p/773463#M245717</link>
      <description>&lt;P&gt;I meant not to create 100 SAS sessions but can at least divide it by 5 independent sessions (example: session1 - loops 1-20, session2 loops 21-40.... so on).&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We are trying to find a way to run our loops in parallel because of the efficiency purpose.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Oct 2021 19:17:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Parallel-processing-with-Loops/m-p/773463#M245717</guid>
      <dc:creator>prad001</dc:creator>
      <dc:date>2021-10-11T19:17:01Z</dc:date>
    </item>
    <item>
      <title>Re: Parallel processing with Loops</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Parallel-processing-with-Loops/m-p/773464#M245718</link>
      <description>&lt;P&gt;Do you have SAS/CONNECT available to you? Creating 5 parallel sessions is very easy if you have this product. You can check what products you have by running this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc product_status;
run;

proc setinit;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 11 Oct 2021 19:27:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Parallel-processing-with-Loops/m-p/773464#M245718</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2021-10-11T19:27:05Z</dc:date>
    </item>
    <item>
      <title>Re: Parallel processing with Loops</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Parallel-processing-with-Loops/m-p/773465#M245719</link>
      <description>Unfortunately, I do not have SAS/CONNECT.</description>
      <pubDate>Mon, 11 Oct 2021 19:30:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Parallel-processing-with-Loops/m-p/773465#M245719</guid>
      <dc:creator>prad001</dc:creator>
      <dc:date>2021-10-11T19:30:30Z</dc:date>
    </item>
    <item>
      <title>Re: Parallel processing with Loops</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Parallel-processing-with-Loops/m-p/773471#M245720</link>
      <description>&lt;P&gt;Assuming you are using a remote SAS server, do you have the ability to execute OS commands from your SAS sessions? You can check this by running this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc options option = xcmd;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 11 Oct 2021 20:16:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Parallel-processing-with-Loops/m-p/773471#M245720</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2021-10-11T20:16:21Z</dc:date>
    </item>
    <item>
      <title>Re: Parallel processing with Loops</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Parallel-processing-with-Loops/m-p/773472#M245721</link>
      <description>&lt;P&gt;Yes, X command is enabled. And I am using SAS on Linux.&lt;/P&gt;</description>
      <pubDate>Mon, 11 Oct 2021 20:25:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Parallel-processing-with-Loops/m-p/773472#M245721</guid>
      <dc:creator>prad001</dc:creator>
      <dc:date>2021-10-11T20:25:16Z</dc:date>
    </item>
    <item>
      <title>Re: Parallel processing with Loops</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Parallel-processing-with-Loops/m-p/773474#M245723</link>
      <description>&lt;P&gt;Cool, that means you can "shell" a new SAS session to run the parallel processes like this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;x 'sas MySASProgram.sas';&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I don't have the time to dig out an actual parallel example right now but you can search the Communities using the words "parallel processing" as there have been plenty of posts on this.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Oct 2021 20:34:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Parallel-processing-with-Loops/m-p/773474#M245723</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2021-10-11T20:34:01Z</dc:date>
    </item>
    <item>
      <title>Re: Parallel processing with Loops</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Parallel-processing-with-Loops/m-p/773487#M245731</link>
      <description>&lt;P&gt;On UNIX systems, you can run multiple programs in parallel from a shell script.&lt;/P&gt;
&lt;PRE&gt;sas program1.sas&amp;amp;
sas program2.sas&amp;amp;
sas program3.sas&amp;amp;
sas program4.sas&amp;amp;
sas program5.sas&amp;amp;
wait&lt;/PRE&gt;
&lt;P&gt;The &amp;amp; sends the execution to the background, and wait will only return when all background processes have finished.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Oct 2021 21:18:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Parallel-processing-with-Loops/m-p/773487#M245731</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2021-10-11T21:18:00Z</dc:date>
    </item>
    <item>
      <title>Re: Parallel processing with Loops</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Parallel-processing-with-Loops/m-p/773494#M245732</link>
      <description>&lt;P&gt;Also note that parallel processing will only improve performance if you have enough CPU cores, and the storage to handle the I/O. As soon as you reach those limits, further parallelization will in fact lead to substantially worse overall performance.&lt;/P&gt;</description>
      <pubDate>Mon, 11 Oct 2021 21:27:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Parallel-processing-with-Loops/m-p/773494#M245732</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2021-10-11T21:27:47Z</dc:date>
    </item>
    <item>
      <title>Re: Parallel processing with Loops</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Parallel-processing-with-Loops/m-p/773502#M245737</link>
      <description>&lt;P&gt;What&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/11562"&gt;@Kurt_Bremser&lt;/a&gt;&amp;nbsp;said: parallel means slower if the hardware is not up to it.&lt;/P&gt;
&lt;P&gt;Also, I question your need to split the table like this. Why do you need to do this?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Oct 2021 21:54:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Parallel-processing-with-Loops/m-p/773502#M245737</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2021-10-11T21:54:19Z</dc:date>
    </item>
    <item>
      <title>Re: Parallel processing with Loops</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Parallel-processing-with-Loops/m-p/773519#M245745</link>
      <description>&lt;P&gt;Why do you need to create 100 datasets single-observations datasets?&amp;nbsp; Why not make one dataset with 100 observations, and a new variable, say &lt;EM&gt;&lt;STRONG&gt;I_GROUP&lt;/STRONG&gt;&lt;/EM&gt;, corresponding to the &lt;EM&gt;&lt;STRONG&gt;DS2_&amp;amp;i&lt;/STRONG&gt;&lt;/EM&gt; dataset names?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data ds2_all;
  set ds1 (where=(a=1) obs=100);
  i_group=_n_;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Note that the where filter is outsourced to the data set engine, prior to delivering observations to the data step.&amp;nbsp; Therefore the _N_ variable (i.e. the iteration number of the data step) is counting only the a=1 observations.&amp;nbsp; So &lt;EM&gt;&lt;STRONG&gt;i_group&lt;/STRONG&gt;&lt;/EM&gt; is equivalent to your &lt;EM&gt;&lt;STRONG&gt;DS2_&amp;amp;i&lt;/STRONG&gt;&lt;/EM&gt; dataset names.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And like&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/16961"&gt;@ChrisNZ&lt;/a&gt;,&amp;nbsp; I don't see any evident need to do parallel processing, especially for this particular task.&lt;/P&gt;</description>
      <pubDate>Tue, 12 Oct 2021 01:51:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Parallel-processing-with-Loops/m-p/773519#M245745</guid>
      <dc:creator>mkeintz</dc:creator>
      <dc:date>2021-10-12T01:51:36Z</dc:date>
    </item>
    <item>
      <title>Re: Parallel processing with Loops</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Parallel-processing-with-Loops/m-p/773586#M245768</link>
      <description>&lt;P&gt;Take a look at the SYSTASK statement (for Linux here:&amp;nbsp;&lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/hostunx/p0lzxl2mwndagun1dtxbst9s4jea.htm" target="_blank"&gt;SAS Help Center: SYSTASK Statement: UNIX&lt;/A&gt;&amp;nbsp;) which enables you to start several processes in parallel, wait for them all to finish, and get the results for each process.&lt;/P&gt;</description>
      <pubDate>Tue, 12 Oct 2021 11:32:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Parallel-processing-with-Loops/m-p/773586#M245768</guid>
      <dc:creator>s_lassen</dc:creator>
      <dc:date>2021-10-12T11:32:02Z</dc:date>
    </item>
    <item>
      <title>Re: Parallel processing with Loops</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Parallel-processing-with-Loops/m-p/773587#M245769</link>
      <description>&lt;P&gt;Given that you haven't got SAS/Connect but only xcmd available any parallelization will quickly add a lot of complexity to your program.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would first investigate if you can't performance optimize your current code without parallelization before going for such an approach.&lt;/P&gt;
&lt;P&gt;If you share more detail what you really have then people here might be able to provide some guidance.&lt;/P&gt;</description>
      <pubDate>Tue, 12 Oct 2021 11:41:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Parallel-processing-with-Loops/m-p/773587#M245769</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2021-10-12T11:41:47Z</dc:date>
    </item>
    <item>
      <title>Re: Parallel processing with Loops</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Parallel-processing-with-Loops/m-p/773757#M245850</link>
      <description>&lt;P&gt;Thank you for the response Kurt.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Why do I have to split the program.&lt;/P&gt;
&lt;P&gt;My intention was to run the loop in to 100 new SAS sessions. How can I do I create 100 sessions for a given example using SYSTASK ?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And yes, I also read you another comment regarding increasing parallel processing may decrease in the performance. I am trying to figure out the optimal number of parallel processing. Not 100 ofcourse.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Oct 2021 20:49:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Parallel-processing-with-Loops/m-p/773757#M245850</guid>
      <dc:creator>prad001</dc:creator>
      <dc:date>2021-10-12T20:49:53Z</dc:date>
    </item>
    <item>
      <title>Re: Parallel processing with Loops</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Parallel-processing-with-Loops/m-p/773760#M245853</link>
      <description>&lt;P&gt;HI Patrick,&lt;/P&gt;
&lt;P&gt;Please find the below code.. I know this is not the best way to write SAS program. It is the legacy code, I want to see if parallel processing makes any difference.&amp;nbsp; I wanna process the "J" loop in parallel.&amp;nbsp; &amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;%MACRO TEST;
LIBNAME test 'path/location/';

DATA DS1;
SET test.inp_1;
RUN;

DATA DS2;
SET tes.inp_2;
RUN;

PROC SORT DATA=DS1;
By var;
run;

PROC SORT DATA=DS2;
By var;
run;

DATA ds3;
MERGE ds1(in=a) ds2(in=b);
by var;

if a and b;
RUN;

PROC SORT DATA=ds3 nodupkey out=ds4;
By var2;
RUN;

DATA _null_;
SET ds3;
CALL SYMPUT('var3',compress(_n_));
RUN;

%DO j=1 %TO &amp;amp;var3;**********50 times;
DATA _null_;
set ds3(firstobs=&amp;amp;j obs=&amp;amp;j);
CALL SYMPUT('var4',compress(var4));
CALL SYMPUT('var5',compress(var5));
RUN;

DATA ds5;
SET ds3;
WHERE var4="var4" and var5="var5";
RUN;

PROC SORT DATA=ds5 nodupkey out=ds6;
BY var4 var5 var6;
RUN;

DATA _null_;
SET ds6;
CALL SYMPUT('var7',compress(_n_));
RUN;

%DO i=1 %TO &amp;amp;var7;***************100 times;
DATA _null_;
SET ds6;
CALL SYMPUT('var4',compress(var4));
CALL SYMPUT('var5',compress(var5));
CALL SYMPUT('var8',compress(var8));
RUN;

DATA ds7;
set ds5;
WHERE var4="&amp;amp;var4" and var5="&amp;amp;var5" and var8="&amp;amp;var5";
RUN;

DATA ds7;
set ds7;

do i=1 to count;
output;
end;

if a &amp;gt; . then
call symput ('a',compress(a));

if b &amp;gt; . then
call symput ('b',compress(b));
RUN;

PROC SUMMARY data=ds7;
var date;
output out=ds8 min=mindate max=maxdate;
RUN;

******
ODS FOR GRAPH
PROC CAPABILITY
PROC APPEND;

******;
%END;
%END;
%MEND;

%TEST;&lt;/PRE&gt;</description>
      <pubDate>Tue, 12 Oct 2021 20:58:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Parallel-processing-with-Loops/m-p/773760#M245853</guid>
      <dc:creator>prad001</dc:creator>
      <dc:date>2021-10-12T20:58:59Z</dc:date>
    </item>
    <item>
      <title>Re: Parallel processing with Loops</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Parallel-processing-with-Loops/m-p/773786#M245868</link>
      <description>&lt;P&gt;These are macro do loops that just generate SAS code. These loops won't take that long to run. It's the generated SAS code (50*100 times almost the same with many passes through the data) that will take up the time.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Looking into the code you've shared I'm rather certain that you could get rid of all macro processing and get this done via "normal" SAS only using by-group processing. This will then also perform much better. Fixing the code is where you should spend your time.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It's a bit hard to provide fixed code without representative sample data and desired result. I've mocked-up something below but it will likely not fully match what you need. It should show you the way to go.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data inp_1;
  infile datalines truncover dlm=',' dsd;
  input var (var4 var5) ($);
  datalines;
1,x,y
2,x,y
3,a,b
;
data inp_2;
  infile datalines truncover dlm=',' dsd;
  input var var2 $ date :date9.;
  format date date9.;
  datalines;
1,a,01jan2021
1,a,01feb2021
1,b,01mar2021
1,a,01apr2021
2,a,01jan2021
2,c,01feb2021
2,c,01mar2021
4,a,01jan2021
;

libname test "%sysfunc(pathname(work))";
data ds1;
  set test.inp_1;
run;

data ds2;
  set test.inp_2;
run;

proc sort data=ds1;
  by var;
run;

proc sort data=ds2;
  by var;
run;

data ds3;
  merge ds1(in=a) ds2(in=b);
  by var;
  if a and b;
run;

proc summary data=ds3 ;
  class var2;
  var date;
  ways 1;
  output out=ds8 min=mindate max=maxdate;
run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 12 Oct 2021 22:21:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Parallel-processing-with-Loops/m-p/773786#M245868</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2021-10-12T22:21:41Z</dc:date>
    </item>
    <item>
      <title>Re: Parallel processing with Loops</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Parallel-processing-with-Loops/m-p/773926#M245921</link>
      <description>Hi Patrick., Thank you for the code. But if you see my code., ds3 and ds6 are made unique(nodupkey) and the both the loops are up until the last unique value on the full dataset. And if you do by processing, I am not sure of how the nested loops will work. Because this is not very complex code at all but I am not getting an approach of how to write it alternatively.</description>
      <pubDate>Wed, 13 Oct 2021 13:38:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Parallel-processing-with-Loops/m-p/773926#M245921</guid>
      <dc:creator>prad001</dc:creator>
      <dc:date>2021-10-13T13:38:25Z</dc:date>
    </item>
    <item>
      <title>Re: Parallel processing with Loops</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Parallel-processing-with-Loops/m-p/774011#M245952</link>
      <description>&lt;P&gt;Nesting is done in BY by using multiple variables.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;by a b;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;will do a group change whenever b or a changes, and because of the preceding sort with the same BY, all b groups within the first a group will be dealt with first, then all b groups within the second a group, and so on.&lt;/P&gt;
&lt;P&gt;You really need to get an understanding of BY first before you engage in such unwieldy and inefficient macro coding.&lt;/P&gt;</description>
      <pubDate>Wed, 13 Oct 2021 18:32:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Parallel-processing-with-Loops/m-p/774011#M245952</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2021-10-13T18:32:06Z</dc:date>
    </item>
  </channel>
</rss>

