<?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: Indices - Need to Reapply to Dataset? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Indices-Need-to-Reapply-to-Dataset/m-p/888085#M350892</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/216466"&gt;@shl007&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;When rows are appended to a dataset through proc append, I'm finding any indices formerly on that dataset need to be reapplied. Is this result correct/working by design?&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/216466"&gt;@shl007&lt;/a&gt;&amp;nbsp;According to the docu&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13976"&gt;@SASKiwi&lt;/a&gt;&amp;nbsp;refers to the indexes should get updated when using Proc Append. What makes you believe that this is not the case?&lt;/P&gt;</description>
    <pubDate>Mon, 07 Aug 2023 03:42:52 GMT</pubDate>
    <dc:creator>Patrick</dc:creator>
    <dc:date>2023-08-07T03:42:52Z</dc:date>
    <item>
      <title>Indices - Need to Reapply to Dataset?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Indices-Need-to-Reapply-to-Dataset/m-p/888081#M350888</link>
      <description>&lt;P&gt;When rows are appended to a dataset through proc append, I'm finding any indices formerly on that dataset need to be reapplied. Is this result correct/working by design?&lt;/P&gt;</description>
      <pubDate>Mon, 07 Aug 2023 01:41:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Indices-Need-to-Reapply-to-Dataset/m-p/888081#M350888</guid>
      <dc:creator>shl007</dc:creator>
      <dc:date>2023-08-07T01:41:38Z</dc:date>
    </item>
    <item>
      <title>Re: Indices - Need to Reapply to Dataset?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Indices-Need-to-Reapply-to-Dataset/m-p/888082#M350889</link>
      <description>&lt;P&gt;Whenever you append rows to a SAS dataset, indexes also need to be updated. It is by design.&lt;/P&gt;</description>
      <pubDate>Mon, 07 Aug 2023 02:53:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Indices-Need-to-Reapply-to-Dataset/m-p/888082#M350889</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2023-08-07T02:53:24Z</dc:date>
    </item>
    <item>
      <title>Re: Indices - Need to Reapply to Dataset?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Indices-Need-to-Reapply-to-Dataset/m-p/888083#M350890</link>
      <description>&lt;P&gt;Interesting.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;According to the paragraph &lt;EM&gt;&lt;STRONG&gt;Updating an Indexed Data&lt;/STRONG&gt;&lt;/EM&gt; File in&amp;nbsp; &lt;A href="https://documentation.sas.com/doc/en/lrcon/9.4/n06cy7dznbx6gen1q9mat8de6rdq.htm#n0q404sf2jq0p7n1am9ic8tajrcs" target="_self"&gt;Understanding SAS Indexes&lt;/A&gt;&lt;A href="https://documentation.sas.com/doc/ko/lrcon/9.4/n06cy7dznbx6gen1q9mat8de6rdq.htm" target="_self"&gt;,&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;SPAN&gt;Each time that values in an indexed data file are added, modified, or deleted, SAS automatically updates the index. The following activities affect an index as indicated:&lt;/SPAN&gt;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;SPAN&gt;which doesn't mention PROC APPEND.&amp;nbsp; So I suspect the index is not automatically updated when using proc append, but only when the MODIFY statement is used in a DATA step to add/change/delete observations.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 07 Aug 2023 03:10:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Indices-Need-to-Reapply-to-Dataset/m-p/888083#M350890</guid>
      <dc:creator>mkeintz</dc:creator>
      <dc:date>2023-08-07T03:10:34Z</dc:date>
    </item>
    <item>
      <title>Re: Indices - Need to Reapply to Dataset?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Indices-Need-to-Reapply-to-Dataset/m-p/888084#M350891</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/31461"&gt;@mkeintz&lt;/a&gt;&amp;nbsp;- From the link you provided:&lt;/P&gt;
&lt;H3 id="p0utx7youo44x5n1tqeyc28i23cz" class="xisDoc-title"&gt;Appending Data to an Indexed Data File&lt;/H3&gt;
&lt;P class="xisDoc-paragraph"&gt;SAS provides performance improvements when appending a data file to an indexed data file. SAS suspends index updates until all observations are added, and then updates the index with data from the newly added observations. See the APPEND statement in the DATASETS procedure in&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A tabindex="0" href="https://documentation.sas.com/doc/en/proc/9.4/titlepage.htm" target="_blank"&gt;&lt;I&gt;Base SAS Procedures Guide&lt;/I&gt;&lt;/A&gt;.&lt;/P&gt;
&lt;P class="xisDoc-paragraph"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="xisDoc-paragraph"&gt;This makes it clear indexes are updated once all rows are added (rather than doing it for each row added) which no doubt greatly improves performance.&lt;/P&gt;</description>
      <pubDate>Mon, 07 Aug 2023 03:35:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Indices-Need-to-Reapply-to-Dataset/m-p/888084#M350891</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2023-08-07T03:35:39Z</dc:date>
    </item>
    <item>
      <title>Re: Indices - Need to Reapply to Dataset?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Indices-Need-to-Reapply-to-Dataset/m-p/888085#M350892</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/216466"&gt;@shl007&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;When rows are appended to a dataset through proc append, I'm finding any indices formerly on that dataset need to be reapplied. Is this result correct/working by design?&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/216466"&gt;@shl007&lt;/a&gt;&amp;nbsp;According to the docu&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13976"&gt;@SASKiwi&lt;/a&gt;&amp;nbsp;refers to the indexes should get updated when using Proc Append. What makes you believe that this is not the case?&lt;/P&gt;</description>
      <pubDate>Mon, 07 Aug 2023 03:42:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Indices-Need-to-Reapply-to-Dataset/m-p/888085#M350892</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2023-08-07T03:42:52Z</dc:date>
    </item>
    <item>
      <title>Re: Indices - Need to Reapply to Dataset?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Indices-Need-to-Reapply-to-Dataset/m-p/888129#M350907</link>
      <description>&lt;P&gt;Are you using SAS datasets?&amp;nbsp; Or are you appending data into some external database like Oracle?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It should work fine for SAS datasets. Try this example:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data class(index=(age));
  set sashelp.class;
  where sex='M';
run;
proc append data=sashelp.class(where=(sex='F')) base=class;
run;

proc print data=class;
  by age;
run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 07 Aug 2023 14:17:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Indices-Need-to-Reapply-to-Dataset/m-p/888129#M350907</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2023-08-07T14:17:11Z</dc:date>
    </item>
    <item>
      <title>Re: Indices - Need to Reapply to Dataset?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Indices-Need-to-Reapply-to-Dataset/m-p/888474#M351020</link>
      <description>&lt;P&gt;I had done some testing where I had thought the indices weren't sticking, but now I see the indices ARE sticking. Thanks for the clarification!&lt;/P&gt;</description>
      <pubDate>Tue, 08 Aug 2023 21:15:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Indices-Need-to-Reapply-to-Dataset/m-p/888474#M351020</guid>
      <dc:creator>shl007</dc:creator>
      <dc:date>2023-08-08T21:15:51Z</dc:date>
    </item>
    <item>
      <title>Re: Indices - Need to Reapply to Dataset?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Indices-Need-to-Reapply-to-Dataset/m-p/888475#M351021</link>
      <description>I'm doing it using SAS datasets. Thanks for the confirmation!</description>
      <pubDate>Tue, 08 Aug 2023 21:16:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Indices-Need-to-Reapply-to-Dataset/m-p/888475#M351021</guid>
      <dc:creator>shl007</dc:creator>
      <dc:date>2023-08-08T21:16:40Z</dc:date>
    </item>
  </channel>
</rss>

