<?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: sorting by columns in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/sorting-by-columns/m-p/41197#M10641</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Tom,&lt;/P&gt;&lt;P&gt;I think that v1-v1000 are values of one variable of the OP's dateset, not v1-v1000 variables.&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 30 Jan 2012 16:01:10 GMT</pubDate>
    <dc:creator>Linlin</dc:creator>
    <dc:date>2012-01-30T16:01:10Z</dc:date>
    <item>
      <title>sorting by columns</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/sorting-by-columns/m-p/41193#M10637</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, I'm trying to use proc similarity (hope someone is familiar with it) and it needs sequential column variables, eg. Var1 Var2, Var3, ... Var1000, but when I sort it, it sorts as Var1, Var10, Var100, Var101, Var2, ... Var999... How can I keep the normal numbering system 1,2,3,...1000 .. If anyone knows proc similarity, I have 2 groupings that would duplicate the Date which is the ID variable.&amp;nbsp; I'm trying to use a by statement in proc similarity but I'm getting an error that the ID (date) is duplicated from all these groups.&amp;nbsp; Any suggestions, thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Jan 2012 14:19:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/sorting-by-columns/m-p/41193#M10637</guid>
      <dc:creator>podarum</dc:creator>
      <dc:date>2012-01-30T14:19:00Z</dc:date>
    </item>
    <item>
      <title>Re: sorting by columns</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/sorting-by-columns/m-p/41194#M10638</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I provided one possible solution in a different thread where you asked this question.&amp;nbsp; I'm not familiar with proc similarity but, in order to make the variable values so that they sort correctly, use put(_n_,z4.) rather than just _n_.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That way you don't have to do anything extra in order to get it to sort as desired.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Jan 2012 14:22:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/sorting-by-columns/m-p/41194#M10638</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2012-01-30T14:22:23Z</dc:date>
    </item>
    <item>
      <title>sorting by columns</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/sorting-by-columns/m-p/41195#M10639</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Thanks art..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Jan 2012 15:08:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/sorting-by-columns/m-p/41195#M10639</guid>
      <dc:creator>podarum</dc:creator>
      <dc:date>2012-01-30T15:08:17Z</dc:date>
    </item>
    <item>
      <title>Re: sorting by columns</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/sorting-by-columns/m-p/41196#M10640</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can use variable lists in RENAME statement (or data set option) to add in the leading zeros.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data new ;&lt;/P&gt;&lt;P&gt;&amp;nbsp; set old;&lt;/P&gt;&lt;P&gt;&amp;nbsp; rename v1-v1000=v0001-v1000;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc XXXX data=old(rename=(v1-v1000=v0001-v1000));&lt;/P&gt;&lt;P&gt; ....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Jan 2012 15:44:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/sorting-by-columns/m-p/41196#M10640</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2012-01-30T15:44:55Z</dc:date>
    </item>
    <item>
      <title>Re: sorting by columns</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/sorting-by-columns/m-p/41197#M10641</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Tom,&lt;/P&gt;&lt;P&gt;I think that v1-v1000 are values of one variable of the OP's dateset, not v1-v1000 variables.&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Jan 2012 16:01:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/sorting-by-columns/m-p/41197#M10641</guid>
      <dc:creator>Linlin</dc:creator>
      <dc:date>2012-01-30T16:01:10Z</dc:date>
    </item>
  </channel>
</rss>

