<?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: Join/Merge 100,000 data files..Most efficient technqiue? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Join-Merge-100-000-data-files-Most-efficient-technqiue/m-p/341915#M78337</link>
    <description>&lt;P&gt;Since a set statement will only accept datasets until the 32767 character limit for a single SAS statement is reached, once I ran into a situation like yours (which I would avoid like hell, BTW), I'd start by cumulating every 1000 datasets into one (creating 100 data steps dynamically), and then cumulate those 100 datasets into the final one.&lt;/P&gt;
&lt;P&gt;But I'd try to tackle the problem from the other side by not creating the 100000 separate datasets in the first place; must admit though that I have no clue how proc loan works, as we don't have ETS licensed.&lt;/P&gt;</description>
    <pubDate>Fri, 17 Mar 2017 10:16:16 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2017-03-17T10:16:16Z</dc:date>
    <item>
      <title>Join/Merge 100,000 data files..Most efficient technqiue?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Join-Merge-100-000-data-files-Most-efficient-technqiue/m-p/341908#M78334</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I created 100,000 scheduled balance payment tables (per ID) with the proc loans command.&lt;BR /&gt;Every table has 3 Colums with 1. id 2. time and 3. scheduled payment values. Every table has 360 rows.&lt;BR /&gt;&lt;BR /&gt;Now I want these 100,000 tables merged by id and time to my base panel dataset.&lt;BR /&gt;&lt;BR /&gt;I tried the data step merge command with a loop written around my macro but it would take me ages.&lt;BR /&gt;Then I tried to create a full table with all 360*100,000 rows with a simple datastep set command.&lt;BR /&gt;Also i tried to use the proc datastep append command, which was even slower.&lt;BR /&gt;&lt;BR /&gt;is there an efficient way to do that ?&lt;/P&gt;</description>
      <pubDate>Fri, 17 Mar 2017 09:59:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Join-Merge-100-000-data-files-Most-efficient-technqiue/m-p/341908#M78334</guid>
      <dc:creator>kosmirnov</dc:creator>
      <dc:date>2017-03-17T09:59:38Z</dc:date>
    </item>
    <item>
      <title>Re: Join/Merge 100,000 data files..Most efficient technqiue?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Join-Merge-100-000-data-files-Most-efficient-technqiue/m-p/341915#M78337</link>
      <description>&lt;P&gt;Since a set statement will only accept datasets until the 32767 character limit for a single SAS statement is reached, once I ran into a situation like yours (which I would avoid like hell, BTW), I'd start by cumulating every 1000 datasets into one (creating 100 data steps dynamically), and then cumulate those 100 datasets into the final one.&lt;/P&gt;
&lt;P&gt;But I'd try to tackle the problem from the other side by not creating the 100000 separate datasets in the first place; must admit though that I have no clue how proc loan works, as we don't have ETS licensed.&lt;/P&gt;</description>
      <pubDate>Fri, 17 Mar 2017 10:16:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Join-Merge-100-000-data-files-Most-efficient-technqiue/m-p/341915#M78337</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2017-03-17T10:16:16Z</dc:date>
    </item>
    <item>
      <title>Re: Join/Merge 100,000 data files..Most efficient technqiue?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Join-Merge-100-000-data-files-Most-efficient-technqiue/m-p/341920#M78339</link>
      <description>&lt;P&gt;As&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/11562"&gt;@Kurt_Bremser&lt;/a&gt;&amp;nbsp;has said, creating 100,000 tables doesn't sound like an efficient method of working. &amp;nbsp;&lt;/P&gt;
&lt;P&gt;One thing you could do is to set all the files, then transpose them up:&lt;/P&gt;
&lt;PRE&gt;data f1;
  id=1; time=2; payment=2;
run;
data f2;
  id=2; time=10; payment=5;
run;
data inter;
  set f:;
run;
proc transpose data=inter out=want prefix=time;
  by id;
  var payment;
  id time;
  idlabel time;
run;&lt;/PRE&gt;
&lt;P&gt;Just as an example - you can use the : modifier to include all files with a prefix then, save typing them out. &amp;nbsp;Do note, this isn't a good strcuture to program with - i.e. having all the data across. &amp;nbsp;Unless its specifically for an output report, stick with the inter dataset, program with that, and only transpose for your output procedure - will save you lots of mesy coding.&lt;/P&gt;</description>
      <pubDate>Fri, 17 Mar 2017 10:31:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Join-Merge-100-000-data-files-Most-efficient-technqiue/m-p/341920#M78339</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2017-03-17T10:31:40Z</dc:date>
    </item>
    <item>
      <title>Re: Join/Merge 100,000 data files..Most efficient technqiue?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Join-Merge-100-000-data-files-Most-efficient-technqiue/m-p/343624#M78906</link>
      <description>Hi guys,&lt;BR /&gt;&lt;BR /&gt;Thanks for your advice. Just to let you know, i did the following. I did like KurtBremser advised. I splitted the data set in several smaller ones and then everything worked!&lt;BR /&gt;&lt;BR /&gt;Thanks!&lt;BR /&gt;&lt;BR /&gt;Konstantin</description>
      <pubDate>Thu, 23 Mar 2017 09:07:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Join-Merge-100-000-data-files-Most-efficient-technqiue/m-p/343624#M78906</guid>
      <dc:creator>kosmirnov</dc:creator>
      <dc:date>2017-03-23T09:07:42Z</dc:date>
    </item>
  </channel>
</rss>

