<?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 Stack Multiple Datasets in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/How-to-Stack-Multiple-Datasets/m-p/75215#M21803</link>
    <description>Beickham,&lt;BR /&gt;
&lt;BR /&gt;
Just an FYI.  While Scott's solution works for 200 datasets and your immediate problem is solved, it does not scale to 2000, say.  If requires that all of the datasets be open at once and the operating system generally limits the number of "file handles" available (varies by OS).  &lt;BR /&gt;
&lt;BR /&gt;
You could re-write the macro to handle an arbitrary number of datasets, but it could take a lot longer to run.&lt;BR /&gt;
&lt;BR /&gt;
Doc Muhlbaier&lt;BR /&gt;
Duke</description>
    <pubDate>Fri, 09 Oct 2009 17:52:36 GMT</pubDate>
    <dc:creator>Doc_Duke</dc:creator>
    <dc:date>2009-10-09T17:52:36Z</dc:date>
    <item>
      <title>How to Stack Multiple Datasets</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-Stack-Multiple-Datasets/m-p/75212#M21800</link>
      <description>I have 200 datasets:d1,d2,d3...d200, each with only one observation, I want to stack them into one dataset, I tried the codes below but it didn't work:&lt;BR /&gt;
&lt;BR /&gt;
data final;&lt;BR /&gt;
set d1-d200;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
I appreciate your advice in having it work out.&lt;BR /&gt;
&lt;BR /&gt;
Thanks!</description>
      <pubDate>Thu, 08 Oct 2009 20:56:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-Stack-Multiple-Datasets/m-p/75212#M21800</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2009-10-08T20:56:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to Stack Multiple Datasets</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-Stack-Multiple-Datasets/m-p/75213#M21801</link>
      <description>You must list each file separately on the SET statement.  A utility SAS macro to generate the SET parameters can look something like:&lt;BR /&gt;
&lt;BR /&gt;
%MACRO GENSET(FILEPFX=, LOW=, HIGH=);&lt;BR /&gt;
%DO CYC=&amp;amp;LOW %TO &amp;amp;HIGH;&lt;BR /&gt;
  &amp;amp;FILEPFX&amp;amp;CYC&lt;BR /&gt;
%END;&lt;BR /&gt;
%MEND GENSET;&lt;BR /&gt;
&lt;BR /&gt;
DATA FINAL;&lt;BR /&gt;
SET %GENSET(FILEPFX=D,LOW=1,HIGH=200);&lt;BR /&gt;
RUN;&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
SAS Macro Language: Reference&lt;BR /&gt;
Introduction to the Macro Facility&lt;BR /&gt;
&lt;A href="http://support.sas.com/documentation/cdl/en/mcrolref/61885/HTML/default/a002293969.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/mcrolref/61885/HTML/default/a002293969.htm&lt;/A&gt;&lt;BR /&gt;
&lt;BR /&gt;
SAS Macro Programming for Beginners&lt;BR /&gt;
Susan J. Slaughter, Avocet Solutions, Davis, CA&lt;BR /&gt;
Lora D. Delwiche, Delwiche Consulting, Winters, CA&lt;BR /&gt;
&lt;A href="http://www2.sas.com/proceedings/sugi29/243-29.pdf" target="_blank"&gt;http://www2.sas.com/proceedings/sugi29/243-29.pdf&lt;/A&gt;</description>
      <pubDate>Thu, 08 Oct 2009 22:06:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-Stack-Multiple-Datasets/m-p/75213#M21801</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2009-10-08T22:06:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to Stack Multiple Datasets</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-Stack-Multiple-Datasets/m-p/75214#M21802</link>
      <description>It works! Thank you very much Scott.</description>
      <pubDate>Fri, 09 Oct 2009 13:50:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-Stack-Multiple-Datasets/m-p/75214#M21802</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2009-10-09T13:50:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to Stack Multiple Datasets</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-Stack-Multiple-Datasets/m-p/75215#M21803</link>
      <description>Beickham,&lt;BR /&gt;
&lt;BR /&gt;
Just an FYI.  While Scott's solution works for 200 datasets and your immediate problem is solved, it does not scale to 2000, say.  If requires that all of the datasets be open at once and the operating system generally limits the number of "file handles" available (varies by OS).  &lt;BR /&gt;
&lt;BR /&gt;
You could re-write the macro to handle an arbitrary number of datasets, but it could take a lot longer to run.&lt;BR /&gt;
&lt;BR /&gt;
Doc Muhlbaier&lt;BR /&gt;
Duke</description>
      <pubDate>Fri, 09 Oct 2009 17:52:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-Stack-Multiple-Datasets/m-p/75215#M21803</guid>
      <dc:creator>Doc_Duke</dc:creator>
      <dc:date>2009-10-09T17:52:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to Stack Multiple Datasets</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-Stack-Multiple-Datasets/m-p/75216#M21804</link>
      <description>I recently came across the parameter OPEN=DEFER for the SET statement, which might get around the problem of too many files open at once.</description>
      <pubDate>Wed, 14 Oct 2009 09:25:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-Stack-Multiple-Datasets/m-p/75216#M21804</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2009-10-14T09:25:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to Stack Multiple Datasets</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-Stack-Multiple-Datasets/m-p/357907#M64306</link>
      <description>&lt;P&gt;This technique tends to work quite well.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;data final;&lt;BR /&gt;set d:;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data output.combined;&lt;BR /&gt;set output.final_:;&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Thu, 11 May 2017 14:14:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-Stack-Multiple-Datasets/m-p/357907#M64306</guid>
      <dc:creator>tsbrown</dc:creator>
      <dc:date>2017-05-11T14:14:50Z</dc:date>
    </item>
  </channel>
</rss>

