<?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: concatenating in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/concatenating/m-p/72771#M21099</link>
    <description>You are going to need to take control. &lt;BR /&gt;
PROC SQL noprint ;&lt;BR /&gt;
Select memname, input( scan( memname, -1, '_' ), best8.) as suffix_number&lt;BR /&gt;
Into :name_list separated by ' ' , :other&lt;BR /&gt;
From dictionary.tables &lt;BR /&gt;
where libname = 'SAP' and memname like 'TEMP%'&lt;BR /&gt;
Order by suffix_number&lt;BR /&gt;
;</description>
    <pubDate>Sun, 05 Jun 2011 17:06:36 GMT</pubDate>
    <dc:creator>Peter_C</dc:creator>
    <dc:date>2011-06-05T17:06:36Z</dc:date>
    <item>
      <title>concatenating</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/concatenating/m-p/72770#M21098</link>
      <description>Hello,&lt;BR /&gt;
&lt;BR /&gt;
I have 150 files named TEMP_&amp;amp;seed&lt;BR /&gt;
&lt;BR /&gt;
seed=1 to 150&lt;BR /&gt;
&lt;BR /&gt;
I want to stack them in order but when I use the following syntax they files are not ordered right. Why?&lt;BR /&gt;
my codes:&lt;BR /&gt;
data SAP.result;&lt;BR /&gt;
set SAP.TEMP_:;&lt;BR /&gt;
run;&lt;BR /&gt;
Thank you</description>
      <pubDate>Sun, 05 Jun 2011 16:18:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/concatenating/m-p/72770#M21098</guid>
      <dc:creator>R_A_G_</dc:creator>
      <dc:date>2011-06-05T16:18:13Z</dc:date>
    </item>
    <item>
      <title>Re: concatenating</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/concatenating/m-p/72771#M21099</link>
      <description>You are going to need to take control. &lt;BR /&gt;
PROC SQL noprint ;&lt;BR /&gt;
Select memname, input( scan( memname, -1, '_' ), best8.) as suffix_number&lt;BR /&gt;
Into :name_list separated by ' ' , :other&lt;BR /&gt;
From dictionary.tables &lt;BR /&gt;
where libname = 'SAP' and memname like 'TEMP%'&lt;BR /&gt;
Order by suffix_number&lt;BR /&gt;
;</description>
      <pubDate>Sun, 05 Jun 2011 17:06:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/concatenating/m-p/72771#M21099</guid>
      <dc:creator>Peter_C</dc:creator>
      <dc:date>2011-06-05T17:06:36Z</dc:date>
    </item>
    <item>
      <title>Re: concatenating</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/concatenating/m-p/72772#M21100</link>
      <description>Use&lt;BR /&gt;
&lt;BR /&gt;
set temp_1-temp_150 open=defer;

Removed slash / from SET statement, would cause an error.&lt;BR /&gt;
&lt;BR /&gt;
    &lt;BR /&gt;
Message was edited by: data _null_;</description>
      <pubDate>Sun, 05 Jun 2011 20:05:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/concatenating/m-p/72772#M21100</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2011-06-05T20:05:34Z</dc:date>
    </item>
    <item>
      <title>Re: concatenating</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/concatenating/m-p/72773#M21101</link>
      <description>thank you that simple set statement works</description>
      <pubDate>Sun, 05 Jun 2011 23:33:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/concatenating/m-p/72773#M21101</guid>
      <dc:creator>R_A_G_</dc:creator>
      <dc:date>2011-06-05T23:33:58Z</dc:date>
    </item>
    <item>
      <title>Re: concatenating</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/concatenating/m-p/72774#M21102</link>
      <description>Hello,&lt;BR /&gt;
I was wondering what does " / open=defer" do in that statement?&lt;BR /&gt;
&lt;BR /&gt;
Thanks</description>
      <pubDate>Mon, 06 Jun 2011 00:05:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/concatenating/m-p/72774#M21102</guid>
      <dc:creator>R_A_G_</dc:creator>
      <dc:date>2011-06-06T00:05:14Z</dc:date>
    </item>
    <item>
      <title>Re: concatenating</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/concatenating/m-p/72775#M21103</link>
      <description>the open=defer causes the data sets to only be opened when they are ready to be read.  Otherwise all 150 data sets would have to be open at one time (the default).  Under some (most I would assume) OSs there are limits as to the number of open data sets.&lt;BR /&gt;
&lt;BR /&gt;
Using the colon operator in your original code allowed the data sets to be read as they were encountered, which was apparently not in named order.</description>
      <pubDate>Mon, 06 Jun 2011 05:28:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/concatenating/m-p/72775#M21103</guid>
      <dc:creator>ArtC</dc:creator>
      <dc:date>2011-06-06T05:28:23Z</dc:date>
    </item>
    <item>
      <title>Re: concatenating</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/concatenating/m-p/72776#M21104</link>
      <description>Don't use the / that was an error.&lt;BR /&gt;
&lt;BR /&gt;
As mentioned OPEN=DEFER does just that defers opening the files until they are read.  The files must contain exactly the same variables to use Deferred opening which you implied.  If not you may have to concatenate in smaller groups.</description>
      <pubDate>Mon, 06 Jun 2011 13:56:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/concatenating/m-p/72776#M21104</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2011-06-06T13:56:46Z</dc:date>
    </item>
    <item>
      <title>Re: concatenating</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/concatenating/m-p/72777#M21105</link>
      <description>How about:&lt;BR /&gt;
[pre]&lt;BR /&gt;
data SAP.result;&lt;BR /&gt;
set SAP.TEMP_:;&lt;BR /&gt;
 by id;&lt;BR /&gt;
run;&lt;BR /&gt;
[/pre]&lt;BR /&gt;
&lt;BR /&gt;
Ksharp</description>
      <pubDate>Tue, 07 Jun 2011 01:47:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/concatenating/m-p/72777#M21105</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2011-06-07T01:47:16Z</dc:date>
    </item>
    <item>
      <title>Re: concatenating</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/concatenating/m-p/72778#M21106</link>
      <description>Hi KSharp,&lt;BR /&gt;
&lt;BR /&gt;
The id code does not work. I need these files to be stacked in order. Ex: 1st OUT1 2nd OUT2, 3rd OUT3 and so on.&lt;BR /&gt;
&lt;BR /&gt;
thanks</description>
      <pubDate>Mon, 13 Jun 2011 20:46:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/concatenating/m-p/72778#M21106</guid>
      <dc:creator>R_A_G_</dc:creator>
      <dc:date>2011-06-13T20:46:02Z</dc:date>
    </item>
    <item>
      <title>Re: concatenating</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/concatenating/m-p/72779#M21107</link>
      <description>To the OP:  Peter.C	provided you a suitable solution, where a macro variable is generated and you have total control how you might want to sequence the files.  Have a look back at the thread for details.&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.</description>
      <pubDate>Mon, 13 Jun 2011 20:51:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/concatenating/m-p/72779#M21107</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2011-06-13T20:51:17Z</dc:date>
    </item>
    <item>
      <title>Re: concatenating</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/concatenating/m-p/72780#M21108</link>
      <description>Oh.I misunderstood what you mean.But you can use variable listing to get it.I tested it successfully by SAS 9.2&lt;BR /&gt;
&lt;BR /&gt;
[pre]&lt;BR /&gt;
libname xx 'c:\temp';&lt;BR /&gt;
data want;&lt;BR /&gt;
 set xx.makedata1 - xx.makedata4;&lt;BR /&gt;
run;&lt;BR /&gt;
[/pre]&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Ksharp</description>
      <pubDate>Tue, 14 Jun 2011 03:28:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/concatenating/m-p/72780#M21108</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2011-06-14T03:28:26Z</dc:date>
    </item>
    <item>
      <title>Re: concatenating</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/concatenating/m-p/72781#M21109</link>
      <description>thanks Ksharp this simple and short code works well.&lt;BR /&gt;
R.A.G.</description>
      <pubDate>Tue, 14 Jun 2011 16:04:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/concatenating/m-p/72781#M21109</guid>
      <dc:creator>R_A_G_</dc:creator>
      <dc:date>2011-06-14T16:04:24Z</dc:date>
    </item>
  </channel>
</rss>

