<?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 do I add data to an existing dataset in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/How-do-I-add-data-to-an-existing-dataset/m-p/251955#M56780</link>
    <description>&lt;P&gt;The operation is known as Appending, and it depends.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If your data sets have the exact same data structure, including variable names/types then you can do an append. If not, you should ideally make them the same and then append.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Append stacks data, adds more rows, same variables.&lt;/P&gt;
&lt;P&gt;Merges bring the data side by side, adds more columns/variables.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For appending you can use PROC APPEND or SET in a Data step.&lt;/P&gt;
&lt;P&gt;This is an example of an append, except I'm appending the same data twice.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data double_class;
set sashelp.class 
     sashelp.class;

run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 24 Feb 2016 04:00:28 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2016-02-24T04:00:28Z</dc:date>
    <item>
      <title>How do I add data to an existing dataset</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-do-I-add-data-to-an-existing-dataset/m-p/251950#M56779</link>
      <description>&lt;P&gt;Hello. I am new to SAS and apologize if this is elementary. I am using NHANES data and already have a dataset in place for a 3-year period. That said, I just found the same data I need for 3 more years. How do I add this data to my existing dataset?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Wed, 24 Feb 2016 03:13:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-do-I-add-data-to-an-existing-dataset/m-p/251950#M56779</guid>
      <dc:creator>naomimaisel</dc:creator>
      <dc:date>2016-02-24T03:13:50Z</dc:date>
    </item>
    <item>
      <title>Re: How do I add data to an existing dataset</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-do-I-add-data-to-an-existing-dataset/m-p/251955#M56780</link>
      <description>&lt;P&gt;The operation is known as Appending, and it depends.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If your data sets have the exact same data structure, including variable names/types then you can do an append. If not, you should ideally make them the same and then append.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Append stacks data, adds more rows, same variables.&lt;/P&gt;
&lt;P&gt;Merges bring the data side by side, adds more columns/variables.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For appending you can use PROC APPEND or SET in a Data step.&lt;/P&gt;
&lt;P&gt;This is an example of an append, except I'm appending the same data twice.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data double_class;
set sashelp.class 
     sashelp.class;

run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 24 Feb 2016 04:00:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-do-I-add-data-to-an-existing-dataset/m-p/251955#M56780</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-02-24T04:00:28Z</dc:date>
    </item>
    <item>
      <title>Re: How do I add data to an existing dataset</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-do-I-add-data-to-an-existing-dataset/m-p/251956#M56781</link>
      <description>&lt;P&gt;A simple dataset concatenation where you stack all of the new data on top of the old data should do the trick:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
  set existing new;
run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 24 Feb 2016 04:03:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-do-I-add-data-to-an-existing-dataset/m-p/251956#M56781</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2016-02-24T04:03:23Z</dc:date>
    </item>
    <item>
      <title>Re: How do I add data to an existing dataset</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-do-I-add-data-to-an-existing-dataset/m-p/251970#M56783</link>
      <description>&lt;P&gt;PROC APPEND or a DATA step with several datasets in the SET statement will do nicely.&lt;/P&gt;
&lt;P&gt;The difference between the two methods is: the DATA step will do a complete rewrite of the dataset, while APPEND will append physically to the existing dataset.&lt;/P&gt;
&lt;P&gt;APPEND is less tolerant about changes in the data structure, though.&lt;/P&gt;</description>
      <pubDate>Wed, 24 Feb 2016 06:49:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-do-I-add-data-to-an-existing-dataset/m-p/251970#M56783</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2016-02-24T06:49:10Z</dc:date>
    </item>
    <item>
      <title>Re: How do I add data to an existing dataset</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-do-I-add-data-to-an-existing-dataset/m-p/252122#M56797</link>
      <description>A third option would be SQL INSERT INTO. &lt;BR /&gt;The downside is that you need to keep track of the column order.&lt;BR /&gt;The upside is that SQL is close to common knowledge. Performance is comparable with proc append.</description>
      <pubDate>Wed, 24 Feb 2016 18:15:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-do-I-add-data-to-an-existing-dataset/m-p/252122#M56797</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2016-02-24T18:15:54Z</dc:date>
    </item>
  </channel>
</rss>

