<?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: SET OR APPEND? in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/SET-OR-APPEND/m-p/90410#M25832</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here is the link&lt;/P&gt;&lt;P&gt;&lt;A href="https://support.sas.com/pubscat/bookdetails.jsp?catid=1&amp;amp;pc=E2143" title="https://support.sas.com/pubscat/bookdetails.jsp?catid=1&amp;amp;pc=E2143"&gt;SAS Macro Language 1: Essentials Course Notes&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 28 Mar 2013 18:48:39 GMT</pubDate>
    <dc:creator>ArtC</dc:creator>
    <dc:date>2013-03-28T18:48:39Z</dc:date>
    <item>
      <title>SET OR APPEND?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/SET-OR-APPEND/m-p/90404#M25826</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have 20 datasets which share the same variables between them.&lt;/P&gt;&lt;P&gt;Is it better to use Append or Set statements to combine tthem all into a single dataset?&lt;/P&gt;&lt;P&gt;Also that resulting dataset needs to be Updated every month with fresh info&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you help me figure this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Mar 2013 17:43:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/SET-OR-APPEND/m-p/90404#M25826</guid>
      <dc:creator>robertrao</dc:creator>
      <dc:date>2013-03-27T17:43:51Z</dc:date>
    </item>
    <item>
      <title>Re: SET OR APPEND?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/SET-OR-APPEND/m-p/90405#M25827</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Maybe SET with OPEN=DEFER.&amp;nbsp; Check the docs for complete info.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Mar 2013 17:49:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/SET-OR-APPEND/m-p/90405#M25827</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2013-03-27T17:49:46Z</dc:date>
    </item>
    <item>
      <title>Re: SET OR APPEND?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/SET-OR-APPEND/m-p/90406#M25828</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Do any of the variables of the same name have different types (numeric or character)?&lt;/P&gt;&lt;P&gt;Do any of the character variables have different assigned lengths?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If yes to either of these questions you need to address them before either option or you will not be happy with the results.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Mar 2013 21:57:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/SET-OR-APPEND/m-p/90406#M25828</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2013-03-27T21:57:10Z</dc:date>
    </item>
    <item>
      <title>Re: SET OR APPEND?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/SET-OR-APPEND/m-p/90407#M25829</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;APPEND may be more efficient in the long run, but it has less flexibility.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Mar 2013 03:28:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/SET-OR-APPEND/m-p/90407#M25829</guid>
      <dc:creator>ArtC</dc:creator>
      <dc:date>2013-03-28T03:28:43Z</dc:date>
    </item>
    <item>
      <title>Re: SET OR APPEND?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/SET-OR-APPEND/m-p/90408#M25830</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm a bit confused about your statement "resulting dataset needs to be Updated every month with fresh info".&lt;/P&gt;&lt;P&gt;What kind of update is that? Is the repeated append/set operation?&lt;/P&gt;&lt;P&gt;If not, is this concatenation a one time shot? Then there is no need to investigate about efficiency...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Mar 2013 07:48:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/SET-OR-APPEND/m-p/90408#M25830</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2013-03-28T07:48:37Z</dc:date>
    </item>
    <item>
      <title>Re: SET OR APPEND?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/SET-OR-APPEND/m-p/90409#M25831</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi can u help me as to where i can find book "sas macro language 1 essentials"&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Mar 2013 15:46:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/SET-OR-APPEND/m-p/90409#M25831</guid>
      <dc:creator>kriti</dc:creator>
      <dc:date>2013-03-28T15:46:47Z</dc:date>
    </item>
    <item>
      <title>Re: SET OR APPEND?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/SET-OR-APPEND/m-p/90410#M25832</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here is the link&lt;/P&gt;&lt;P&gt;&lt;A href="https://support.sas.com/pubscat/bookdetails.jsp?catid=1&amp;amp;pc=E2143" title="https://support.sas.com/pubscat/bookdetails.jsp?catid=1&amp;amp;pc=E2143"&gt;SAS Macro Language 1: Essentials Course Notes&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Mar 2013 18:48:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/SET-OR-APPEND/m-p/90410#M25832</guid>
      <dc:creator>ArtC</dc:creator>
      <dc:date>2013-03-28T18:48:39Z</dc:date>
    </item>
    <item>
      <title>Re: SET OR APPEND?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/SET-OR-APPEND/m-p/90411#M25833</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG&gt;robertrao,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I guess you must have some variables that define the class or a group.&lt;/P&gt;&lt;P&gt;Is it possible in your case that two diffrerent datasets have at least one row with equal class variables and different properties?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Like...&lt;/P&gt;&lt;P&gt;Date&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Price&lt;/P&gt;&lt;P&gt;01JAN2010&amp;nbsp;&amp;nbsp; 100&amp;nbsp;&amp;nbsp; in dataset 1&lt;/P&gt;&lt;P&gt;01JAN2010&amp;nbsp;&amp;nbsp; 200&amp;nbsp;&amp;nbsp; in dataset 2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If it is and your datasets are not really big consider using merge instead of set or append: then you will have only one value for each class set by the last dataset you merged.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Mar 2013 05:43:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/SET-OR-APPEND/m-p/90411#M25833</guid>
      <dc:creator>ghastly_kitten</dc:creator>
      <dc:date>2013-03-29T05:43:03Z</dc:date>
    </item>
    <item>
      <title>Re: SET OR APPEND?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/SET-OR-APPEND/m-p/90412#M25834</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In general, PROC APPEND is more efficient because it merely opens the base data set and adds the additional observations to it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When you use SET to concatenate data sets, as here:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data base;&lt;/P&gt;&lt;P&gt;&amp;nbsp; set base newdata;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you are rewriting all the base observations in addition to the new data.&amp;nbsp; When your data sets are small, this is not important.&amp;nbsp; However, as the base data set gets larger, you wll find the process taking longer and longer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As Art Carpenter noted, the SET method allows you to apply program logic to the concatenation and is far more flexible than PROC APPEND.&lt;/P&gt;&lt;P&gt;If speed and efficiency are critical, and you simply want to add the observations, use PROC APPEND. &lt;/P&gt;&lt;P&gt;If you require flexibility and program logic, use SET statement.&lt;/P&gt;&lt;P&gt;If you want to summarize statements on key variable(s), use MERGE statement as suggested by @ghastly_kitten&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Jan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Mar 2013 14:42:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/SET-OR-APPEND/m-p/90412#M25834</guid>
      <dc:creator>jwsquillace</dc:creator>
      <dc:date>2013-03-29T14:42:22Z</dc:date>
    </item>
    <item>
      <title>Re: SET OR APPEND?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/SET-OR-APPEND/m-p/90413#M25835</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I search support.sas.com for "proc append samples"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here are some that may be applicable:&lt;/P&gt;&lt;P&gt;Sample &lt;EM&gt;48810: &lt;/EM&gt;Append all SAS data sets in a SAS library into 1 SAS data set when the number of SAS data sets varies&lt;/P&gt;&lt;P&gt;&lt;SPAN style="padding: 0px 5px;"&gt;&lt;A href="http://support.sas.com/kb/48810" target="_blank"&gt;http://support.sas.com/kb/48810&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sample &lt;EM&gt;45143: &lt;/EM&gt;Error trapping with PROC APPEND&lt;/P&gt;&lt;P&gt;&lt;SPAN style="padding: 0px 5px;"&gt;&lt;A href="http://support.sas.com/kb/45143" target="_blank"&gt;http://support.sas.com/kb/45143&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sample &lt;EM&gt;25291: &lt;/EM&gt;Adding new observations to a SAS data set using PROC APPEND&lt;/P&gt;&lt;P&gt;&lt;SPAN style="padding: 0px 5px;"&gt;&lt;A href="http://support.sas.com/kb/25291" target="_blank"&gt;http://support.sas.com/kb/25291&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sample &lt;EM&gt;33407: &lt;/EM&gt;Combining Data Sets Containing Character Variables of Different Lengths&lt;/P&gt;&lt;P&gt;&lt;SPAN style="padding: 0px 5px;"&gt;&lt;A href="http://support.sas.com/kb/33407" target="_blank"&gt;http://support.sas.com/kb/33407&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One of these may give you ideas to get started.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Jan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Apr 2013 19:12:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/SET-OR-APPEND/m-p/90413#M25835</guid>
      <dc:creator>jwsquillace</dc:creator>
      <dc:date>2013-04-03T19:12:56Z</dc:date>
    </item>
    <item>
      <title>Re: SET OR APPEND?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/SET-OR-APPEND/m-p/90414#M25836</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have a couple of questions in the following link...&lt;/P&gt;&lt;P&gt;&lt;SPAN style="padding: 0px 5px;"&gt;&lt;A class="jive-link-external-small" href="http://support.sas.com/kb/48810"&gt;http://support.sas.com/kb/48810&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc contents data=abc._all_ out=abccont(keep=memname) noprint;&amp;nbsp;&amp;nbsp;&amp;nbsp; /*what does the memname refer to*/&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ALSO&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%macro combdsets;&lt;/P&gt;&lt;P&gt;%do i=1 %to &amp;amp;count;&lt;/P&gt;&lt;P&gt;proc append base=new data=abc.&amp;amp;&amp;amp;name&amp;amp;i force;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /*after running this macro step "NEW"&amp;nbsp; dataset is created which has all the datasets???*/&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;%end;&lt;/P&gt;&lt;P&gt;%mend combdsets;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Apr 2013 19:45:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/SET-OR-APPEND/m-p/90414#M25836</guid>
      <dc:creator>robertrao</dc:creator>
      <dc:date>2013-04-03T19:45:25Z</dc:date>
    </item>
    <item>
      <title>Re: SET OR APPEND?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/SET-OR-APPEND/m-p/90415#M25837</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Start a new thread and clarify your questions please.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Apr 2013 19:54:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/SET-OR-APPEND/m-p/90415#M25837</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2013-04-03T19:54:00Z</dc:date>
    </item>
  </channel>
</rss>

