<?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: A question in terns of &amp;quot;index&amp;quot; in SAS programming in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/A-question-in-terns-of-quot-index-quot-in-SAS-programming/m-p/519660#M140800</link>
    <description>&lt;P&gt;The datastep creates a new dataset for which no index is defined.&lt;/P&gt;</description>
    <pubDate>Sat, 08 Dec 2018 17:29:00 GMT</pubDate>
    <dc:creator>PGStats</dc:creator>
    <dc:date>2018-12-08T17:29:00Z</dc:date>
    <item>
      <title>A question in terns of "index" in SAS programming</title>
      <link>https://communities.sas.com/t5/SAS-Programming/A-question-in-terns-of-quot-index-quot-in-SAS-programming/m-p/519653#M140794</link>
      <description>&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have an SAS question in terms of the "index" when doing "rename", as follows:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;The SAS data set WORK.TEST has an index on the variable ID and the following    
                                                                                
SAS program is submitted.                                                       
                                                                                
data WORK.TEST;                                                                 
  set WORK.TEST(                                                                
keep=ID Var_1 Var_2                                                             
rename=(ID=ID_Code);                                                            
Total=sum(Var_1 Var_2);                                                         
run;                                                                            
                                                                                
                                                                                
Which describes the result of submitting the SAS program?                       
                                                                                
A.                                                                              
The index on ID is deleted.                                                     
                                                                                
B.                                                                              
The index on ID is updated as an index on ID_Code.      

C.                                                                              
The index on ID is deleted and an index on ID_Code is created.                  
                                                                                
D.                                                                              
The index on ID is recreated as an index on ID_Code.  &lt;/PRE&gt;&lt;P&gt;The answer seems A, and I wonder why. Any help would be appreciated.&lt;/P&gt;&lt;P&gt;I chose C.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 08 Dec 2018 16:09:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/A-question-in-terns-of-quot-index-quot-in-SAS-programming/m-p/519653#M140794</guid>
      <dc:creator>jc3992</dc:creator>
      <dc:date>2018-12-08T16:09:29Z</dc:date>
    </item>
    <item>
      <title>Re: A question in terns of "index" in SAS programming</title>
      <link>https://communities.sas.com/t5/SAS-Programming/A-question-in-terns-of-quot-index-quot-in-SAS-programming/m-p/519660#M140800</link>
      <description>&lt;P&gt;The datastep creates a new dataset for which no index is defined.&lt;/P&gt;</description>
      <pubDate>Sat, 08 Dec 2018 17:29:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/A-question-in-terns-of-quot-index-quot-in-SAS-programming/m-p/519660#M140800</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2018-12-08T17:29:00Z</dc:date>
    </item>
    <item>
      <title>Re: A question in terns of "index" in SAS programming</title>
      <link>https://communities.sas.com/t5/SAS-Programming/A-question-in-terns-of-quot-index-quot-in-SAS-programming/m-p/519695#M140810</link>
      <description>Even if you use the same data set name, it essentially deletes and replace it. This is bad programming style and should not be used.</description>
      <pubDate>Sat, 08 Dec 2018 21:28:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/A-question-in-terns-of-quot-index-quot-in-SAS-programming/m-p/519695#M140810</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-12-08T21:28:44Z</dc:date>
    </item>
    <item>
      <title>Re: A question in terns of "index" in SAS programming</title>
      <link>https://communities.sas.com/t5/SAS-Programming/A-question-in-terns-of-quot-index-quot-in-SAS-programming/m-p/519705#M140818</link>
      <description>&lt;P&gt;Thank you very much!&amp;nbsp;&lt;/P&gt;&lt;P&gt;so the new data set (the new WORK.TEST) has no index?&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Sat, 08 Dec 2018 23:15:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/A-question-in-terns-of-quot-index-quot-in-SAS-programming/m-p/519705#M140818</guid>
      <dc:creator>jc3992</dc:creator>
      <dc:date>2018-12-08T23:15:25Z</dc:date>
    </item>
    <item>
      <title>Re: A question in terns of "index" in SAS programming</title>
      <link>https://communities.sas.com/t5/SAS-Programming/A-question-in-terns-of-quot-index-quot-in-SAS-programming/m-p/519714#M140821</link>
      <description>&lt;P&gt;Indeed. - Actually, if you run the code as given above, the dataset test will not be replaced because of syntax errors. The code is missing a comma and a closing parenthesis.&lt;/P&gt;</description>
      <pubDate>Sun, 09 Dec 2018 01:22:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/A-question-in-terns-of-quot-index-quot-in-SAS-programming/m-p/519714#M140821</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2018-12-09T01:22:38Z</dc:date>
    </item>
    <item>
      <title>Re: A question in terns of "index" in SAS programming</title>
      <link>https://communities.sas.com/t5/SAS-Programming/A-question-in-terns-of-quot-index-quot-in-SAS-programming/m-p/519744#M140831</link>
      <description>&lt;P&gt;Yes, the answer is A.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you want to preserve the index, use the &lt;A href="http://support.sas.com/documentation/cdl/en/proc/61895/HTML/default/viewer.htm#a000247654.htm" target="_self"&gt;Copy Statement in PROC DATASETS&lt;/A&gt; with Index=YES (Default).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 09 Dec 2018 10:40:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/A-question-in-terns-of-quot-index-quot-in-SAS-programming/m-p/519744#M140831</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2018-12-09T10:40:34Z</dc:date>
    </item>
  </channel>
</rss>

