<?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: SAS Splitting,Sorting,Merging Large dataset in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/SAS-Splitting-Sorting-Merging-Large-dataset/m-p/560514#M156754</link>
    <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/11562"&gt;@Kurt_Bremser&lt;/a&gt;&amp;nbsp;.&lt;/P&gt;</description>
    <pubDate>Tue, 21 May 2019 14:19:08 GMT</pubDate>
    <dc:creator>JJP1</dc:creator>
    <dc:date>2019-05-21T14:19:08Z</dc:date>
    <item>
      <title>SAS Splitting,Sorting,Merging Large dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Splitting-Sorting-Merging-Large-dataset/m-p/560416#M156709</link>
      <description>&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;Would you please help on coding part for below steps please.please help&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
set xx.ZBB nobs=nobs; (dataset has 800+ millions of records)
call symputx('nobs',nobs);
run;
%do i=1 to 8;
*create sas code to sort nobs/8 at a time;
* run the sas code;
%end;
*create a wait code to ensure 8 datasets are created;
*run the following four datasteps in parallel;
data four1;
merge eight1-eight2;
by key;
run;
data four2;
merge eight3-eight4;
by key;
data four3;
merge eight5-eight6;
by key;
run;
data four4;
merge eight7-eight8;
by key;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 21 May 2019 09:09:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Splitting-Sorting-Merging-Large-dataset/m-p/560416#M156709</guid>
      <dc:creator>JJP1</dc:creator>
      <dc:date>2019-05-21T09:09:31Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Splitting,Sorting,Merging Large dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Splitting-Sorting-Merging-Large-dataset/m-p/560452#M156726</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data
&amp;nbsp; eight1
&amp;nbsp; eight2
  eight3
  eight4
  eight5
  eight6
  eight7
  eight8
;
set xx.zbb;
select (mod(_n_,8);
  when (1) output eight1;
  when (2) output eight2;
  when (3) output eight3;
  when (4) output eight4;
  when (5) output eight5;
  when (6) output eight6;
  when (7) output eight7;
  when (0) output eight8;
end;
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;takes care of splitting in one step, without having to count at all.&lt;/P&gt;</description>
      <pubDate>Tue, 21 May 2019 11:49:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Splitting-Sorting-Merging-Large-dataset/m-p/560452#M156726</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2019-05-21T11:49:24Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Splitting,Sorting,Merging Large dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Splitting-Sorting-Merging-Large-dataset/m-p/560514#M156754</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/11562"&gt;@Kurt_Bremser&lt;/a&gt;&amp;nbsp;.&lt;/P&gt;</description>
      <pubDate>Tue, 21 May 2019 14:19:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Splitting-Sorting-Merging-Large-dataset/m-p/560514#M156754</guid>
      <dc:creator>JJP1</dc:creator>
      <dc:date>2019-05-21T14:19:08Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Splitting,Sorting,Merging Large dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Splitting-Sorting-Merging-Large-dataset/m-p/560526#M156763</link>
      <description>&lt;P&gt;There are several items you need to address besides the splitting of the data.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you plan to put all the data sets back together again as the final step, there is no advantage in creating FOUR1 FOUR2 FOUR3 and FOUR4.&amp;nbsp; You might as well just combine all 8 subsets in one step.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;MERGE is the wrong tool for the job.&amp;nbsp; It is slower and does the wrong thing.&amp;nbsp; Using MERGE explains the results you got that dropped a handful of observations.&amp;nbsp; That result means that KEY is not unique.&amp;nbsp; I don't know whether it is supposed to be unique or not, but there are some KEYs with more than 1 observation in your original data set.&amp;nbsp; The right tool for the job would be SET instead of MERGE (but keep the BY statement in the program).&amp;nbsp; If your boss told you to use MERGE, you need someone on the team with more SAS knowledge.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 21 May 2019 14:40:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Splitting-Sorting-Merging-Large-dataset/m-p/560526#M156763</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2019-05-21T14:40:31Z</dc:date>
    </item>
  </channel>
</rss>

