<?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 Proc Sort Alphanumerically in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-Proc-Sort-Alphanumerically/m-p/357007#M274188</link>
    <description>&lt;P&gt;Thank you! This worked perfectly.&lt;/P&gt;</description>
    <pubDate>Mon, 08 May 2017 20:14:49 GMT</pubDate>
    <dc:creator>yawenyu</dc:creator>
    <dc:date>2017-05-08T20:14:49Z</dc:date>
    <item>
      <title>How to Proc Sort Alphanumerically</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-Proc-Sort-Alphanumerically/m-p/356972#M274186</link>
      <description>&lt;P&gt;Hello!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using SAS ver9.3 to sort observations. They are as follows:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;NT1&lt;/P&gt;&lt;P&gt;NT2&lt;/P&gt;&lt;P&gt;T1&lt;/P&gt;&lt;P&gt;T2&lt;/P&gt;&lt;P&gt;T3&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to sort them as:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;T1&lt;/P&gt;&lt;P&gt;T2&lt;/P&gt;&lt;P&gt;T3&lt;/P&gt;&lt;P&gt;NT1&lt;/P&gt;&lt;P&gt;NT2&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;A simple DECENDING statement does not work, and give me T3, T2, T1, NT2, NT1. Is there a&amp;nbsp;proper way to sort this? Thank you in advance. I am new at SAS programming so apologies if there is a simple solution I am not realizing.&lt;/P&gt;</description>
      <pubDate>Mon, 08 May 2017 18:45:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-Proc-Sort-Alphanumerically/m-p/356972#M274186</guid>
      <dc:creator>yawenyu</dc:creator>
      <dc:date>2017-05-08T18:45:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to Proc Sort Alphanumerically</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-Proc-Sort-Alphanumerically/m-p/356977#M274187</link>
      <description>&lt;P&gt;Well, there's not really a simple solution. &amp;nbsp;SAS isn't built to sort in an order that is neither ascending nor descending. &amp;nbsp;You would need to create an extra variable based on your old variable:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;if oldvar =: 'T' then sort_order=1;&lt;/P&gt;
&lt;P&gt;else sort_order=2;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then use that as part of your sorting sequence:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc sort data=have;&lt;/P&gt;
&lt;P&gt;by sort_order oldvar;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;</description>
      <pubDate>Mon, 08 May 2017 18:53:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-Proc-Sort-Alphanumerically/m-p/356977#M274187</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2017-05-08T18:53:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to Proc Sort Alphanumerically</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-Proc-Sort-Alphanumerically/m-p/357007#M274188</link>
      <description>&lt;P&gt;Thank you! This worked perfectly.&lt;/P&gt;</description>
      <pubDate>Mon, 08 May 2017 20:14:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-Proc-Sort-Alphanumerically/m-p/357007#M274188</guid>
      <dc:creator>yawenyu</dc:creator>
      <dc:date>2017-05-08T20:14:49Z</dc:date>
    </item>
  </channel>
</rss>

