<?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 to rename all the variables as X1-X10? in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/How-to-rename-all-the-variables-as-X1-X10/m-p/70113#M20177</link>
    <description>I don't think call sortn really cares.  Here are two examples, one with and one without renaming:&lt;BR /&gt;
[pre]&lt;BR /&gt;
data want1;&lt;BR /&gt;
  set sashelp.class;&lt;BR /&gt;
  array nums(3) age--weight;&lt;BR /&gt;
  if name eq "Judy" then weight=50;&lt;BR /&gt;
  call sortn(of nums(*));&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
data want2;&lt;BR /&gt;
  set sashelp.class (rename=(age=x1 height=x2 weight=x3));&lt;BR /&gt;
  array nums(3) x1-x3;&lt;BR /&gt;
  if name eq "Judy" then x3=50;&lt;BR /&gt;
  call sortn(of nums(*));&lt;BR /&gt;
run;&lt;BR /&gt;
[/pre]&lt;BR /&gt;
HTH,&lt;BR /&gt;
Art&lt;BR /&gt;
---------&amp;gt; Hi, everyone:&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; Finally I found that call sortn can be used to sort&lt;BR /&gt;
&amp;gt; data observation wise.&lt;BR /&gt;
&amp;gt; But the restriction is that the names in the array&lt;BR /&gt;
&amp;gt; should be uniform as X1-X10. Otherwise the command&lt;BR /&gt;
&amp;gt; does not work with out warning. &lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; Can anybody teach me to rename all the variables such&lt;BR /&gt;
&amp;gt; as X1-X10?</description>
    <pubDate>Thu, 26 May 2011 23:39:57 GMT</pubDate>
    <dc:creator>art297</dc:creator>
    <dc:date>2011-05-26T23:39:57Z</dc:date>
    <item>
      <title>How to rename all the variables as X1-X10?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-rename-all-the-variables-as-X1-X10/m-p/70112#M20176</link>
      <description>Hi, everyone:&lt;BR /&gt;
&lt;BR /&gt;
Finally I found that call sortn can be used to sort data observation wise.&lt;BR /&gt;
But the restriction is that the names in the array should be uniform as X1-X10. Otherwise the command does not work with out warning. &lt;BR /&gt;
&lt;BR /&gt;
Can anybody teach me to rename all the variables such as X1-X10?</description>
      <pubDate>Thu, 26 May 2011 18:09:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-rename-all-the-variables-as-X1-X10/m-p/70112#M20176</guid>
      <dc:creator>sunrain</dc:creator>
      <dc:date>2011-05-26T18:09:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to rename all the variables as X1-X10?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-rename-all-the-variables-as-X1-X10/m-p/70113#M20177</link>
      <description>I don't think call sortn really cares.  Here are two examples, one with and one without renaming:&lt;BR /&gt;
[pre]&lt;BR /&gt;
data want1;&lt;BR /&gt;
  set sashelp.class;&lt;BR /&gt;
  array nums(3) age--weight;&lt;BR /&gt;
  if name eq "Judy" then weight=50;&lt;BR /&gt;
  call sortn(of nums(*));&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
data want2;&lt;BR /&gt;
  set sashelp.class (rename=(age=x1 height=x2 weight=x3));&lt;BR /&gt;
  array nums(3) x1-x3;&lt;BR /&gt;
  if name eq "Judy" then x3=50;&lt;BR /&gt;
  call sortn(of nums(*));&lt;BR /&gt;
run;&lt;BR /&gt;
[/pre]&lt;BR /&gt;
HTH,&lt;BR /&gt;
Art&lt;BR /&gt;
---------&amp;gt; Hi, everyone:&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; Finally I found that call sortn can be used to sort&lt;BR /&gt;
&amp;gt; data observation wise.&lt;BR /&gt;
&amp;gt; But the restriction is that the names in the array&lt;BR /&gt;
&amp;gt; should be uniform as X1-X10. Otherwise the command&lt;BR /&gt;
&amp;gt; does not work with out warning. &lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; Can anybody teach me to rename all the variables such&lt;BR /&gt;
&amp;gt; as X1-X10?</description>
      <pubDate>Thu, 26 May 2011 23:39:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-rename-all-the-variables-as-X1-X10/m-p/70113#M20177</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2011-05-26T23:39:57Z</dc:date>
    </item>
  </channel>
</rss>

