<?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 with specific positioning of a record. in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Concatenating-with-specific-positioning-of-a-record/m-p/21844#M3512</link>
    <description>[pre]&lt;BR /&gt;
data table1;&lt;BR /&gt;
   do i = 1 to 11;&lt;BR /&gt;
      output;&lt;BR /&gt;
      end;&lt;BR /&gt;
   run;&lt;BR /&gt;
data table2;&lt;BR /&gt;
   do j = 1;&lt;BR /&gt;
      output;&lt;BR /&gt;
      end;&lt;BR /&gt;
   run;&lt;BR /&gt;
data table0;&lt;BR /&gt;
   set table1(obs=3) table2 table1(firstobs=4);&lt;BR /&gt;
   run;&lt;BR /&gt;
proc print;&lt;BR /&gt;
   run;&lt;BR /&gt;
[/pre]</description>
    <pubDate>Wed, 22 Apr 2009 13:03:36 GMT</pubDate>
    <dc:creator>data_null__</dc:creator>
    <dc:date>2009-04-22T13:03:36Z</dc:date>
    <item>
      <title>Concatenating with specific positioning of a record.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Concatenating-with-specific-positioning-of-a-record/m-p/21843#M3511</link>
      <description>I have 2 data sets Table1 and Table2. They have the same 3 variables Var1, Var2 and Var 3. There is no special sorting order of the 3 variables.&lt;BR /&gt;
&lt;BR /&gt;
Table1 contains 11 records. Table2 contains only 1 record. I want to make one new table with all the 12 records.&lt;BR /&gt;
&lt;BR /&gt;
The record from Table2 should be placed as record number 4 in the new data set, so records 1 - 3 comes from Table1:s records with the same number and records 5 - 12 should come fromTable1:s records 4 - 11.&lt;BR /&gt;
&lt;BR /&gt;
That must be possible to create?</description>
      <pubDate>Wed, 22 Apr 2009 12:41:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Concatenating-with-specific-positioning-of-a-record/m-p/21843#M3511</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2009-04-22T12:41:10Z</dc:date>
    </item>
    <item>
      <title>Re: Concatenating with specific positioning of a record.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Concatenating-with-specific-positioning-of-a-record/m-p/21844#M3512</link>
      <description>[pre]&lt;BR /&gt;
data table1;&lt;BR /&gt;
   do i = 1 to 11;&lt;BR /&gt;
      output;&lt;BR /&gt;
      end;&lt;BR /&gt;
   run;&lt;BR /&gt;
data table2;&lt;BR /&gt;
   do j = 1;&lt;BR /&gt;
      output;&lt;BR /&gt;
      end;&lt;BR /&gt;
   run;&lt;BR /&gt;
data table0;&lt;BR /&gt;
   set table1(obs=3) table2 table1(firstobs=4);&lt;BR /&gt;
   run;&lt;BR /&gt;
proc print;&lt;BR /&gt;
   run;&lt;BR /&gt;
[/pre]</description>
      <pubDate>Wed, 22 Apr 2009 13:03:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Concatenating-with-specific-positioning-of-a-record/m-p/21844#M3512</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2009-04-22T13:03:36Z</dc:date>
    </item>
    <item>
      <title>Re: Concatenating with specific positioning of a record.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Concatenating-with-specific-positioning-of-a-record/m-p/21845#M3513</link>
      <description>And another way to do the same thing.&lt;BR /&gt;
&lt;BR /&gt;
data table0;&lt;BR /&gt;
set table1;&lt;BR /&gt;
output;&lt;BR /&gt;
/* _N_ holds the current obs number */&lt;BR /&gt;
if _N_ eq 3 then &lt;BR /&gt;
do until (_EOF); /* _EOF checks the end of the table2 dataset */&lt;BR /&gt;
set table2 end = _EOF;&lt;BR /&gt;
output;&lt;BR /&gt;
end;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
caution, both solutions will totally insert table2 (every row) at row 3 in table1.&lt;BR /&gt;
&lt;BR /&gt;
Greetings from Portugal.&lt;BR /&gt;
&lt;BR /&gt;
Daniel Santos at &lt;A href="http://www.cgd.pt" target="_blank"&gt;www.cgd.pt&lt;/A&gt;.</description>
      <pubDate>Wed, 22 Apr 2009 17:01:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Concatenating-with-specific-positioning-of-a-record/m-p/21845#M3513</guid>
      <dc:creator>DanielSantos</dc:creator>
      <dc:date>2009-04-22T17:01:20Z</dc:date>
    </item>
  </channel>
</rss>

