<?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: Order of values in SAS in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Order-of-values-in-SAS/m-p/774327#M246098</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159549"&gt;@Ronein&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The sorting depends on the variable type&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Numeric variables are internally stored as double-precision float and are sorted on the numeric value, not on the digits you see.&lt;/P&gt;
&lt;P&gt;Character values are sorted character by character (sort on first character, then second and so on..) on the decimal value of the character. All characters (digits, space, letters etc.) have a place in the latin- or utf8 or whatever-table and are sorted according to that.&lt;/P&gt;</description>
    <pubDate>Thu, 14 Oct 2021 19:36:57 GMT</pubDate>
    <dc:creator>ErikLund_Jensen</dc:creator>
    <dc:date>2021-10-14T19:36:57Z</dc:date>
    <item>
      <title>Order of values in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Order-of-values-in-SAS/m-p/774326#M246097</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;I know the order of simple numbers (for example: 3,9,18,21,48)&lt;/P&gt;
&lt;P&gt;I know the order of alphabetic (for example: Luxury,Midsize,Sporty)&lt;/P&gt;
&lt;P&gt;What is the rule to order char values : 18-19 ,19-21,21+?&lt;/P&gt;
&lt;P&gt;What is the rule to order char values :Till 18,&amp;nbsp; 18-19 ,19-21,21+?&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;May also explain why?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Oct 2021 19:25:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Order-of-values-in-SAS/m-p/774326#M246097</guid>
      <dc:creator>Ronein</dc:creator>
      <dc:date>2021-10-14T19:25:54Z</dc:date>
    </item>
    <item>
      <title>Re: Order of values in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Order-of-values-in-SAS/m-p/774327#M246098</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159549"&gt;@Ronein&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The sorting depends on the variable type&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Numeric variables are internally stored as double-precision float and are sorted on the numeric value, not on the digits you see.&lt;/P&gt;
&lt;P&gt;Character values are sorted character by character (sort on first character, then second and so on..) on the decimal value of the character. All characters (digits, space, letters etc.) have a place in the latin- or utf8 or whatever-table and are sorted according to that.&lt;/P&gt;</description>
      <pubDate>Thu, 14 Oct 2021 19:36:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Order-of-values-in-SAS/m-p/774327#M246098</guid>
      <dc:creator>ErikLund_Jensen</dc:creator>
      <dc:date>2021-10-14T19:36:57Z</dc:date>
    </item>
    <item>
      <title>Re: Order of values in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Order-of-values-in-SAS/m-p/774330#M246100</link>
      <description>&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;SPAN&gt;What is the rule to order char values :Till 18,&amp;nbsp; 18-19 ,19-21,21+?&lt;/SPAN&gt;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;SPAN&gt;From your earlier questions ... if the above is a formatted value of a numeric variable, you have the option in many SAS PROCs (such as PROC REPORT, PROC SUMMARY, PROC FREQ and probably many others) to sort these alphabetically based upon the formatted value, or to sort them numerically based upon the unformatted numbers. In general, it makes more sense to sort formatted values by the unformatted numbers, so 18 is always greater than "Till 18". PROC SORT will always use the UNFORMATTED values.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Oct 2021 19:42:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Order-of-values-in-SAS/m-p/774330#M246100</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2021-10-14T19:42:28Z</dc:date>
    </item>
    <item>
      <title>Re: Order of values in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Order-of-values-in-SAS/m-p/774340#M246102</link>
      <description>&lt;P&gt;Character values are basically sorted according to the position of characters in the ASCII (Windows/UNIX) or EBCDIC (z/OS) table. But the sort order can be influenced by using alternate &lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/v_011/nlsref/p1d7k16vtur7s4n1nbbaf8ro6sk7.htm#:~:text=The%20collating%20sequence%20is%20the,in%20relation%20to%20other%20characters." target="_blank" rel="noopener"&gt;collating sequences&lt;/A&gt; for NLS support.&lt;/P&gt;</description>
      <pubDate>Thu, 14 Oct 2021 19:55:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Order-of-values-in-SAS/m-p/774340#M246102</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2021-10-14T19:55:42Z</dc:date>
    </item>
    <item>
      <title>Re: Order of values in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Order-of-values-in-SAS/m-p/774342#M246104</link>
      <description>Thanks,&lt;BR /&gt;I ask about char values &lt;BR /&gt;Till 18,  18-19 ,19-21,21+&lt;BR /&gt;What is the order of them please?</description>
      <pubDate>Thu, 14 Oct 2021 20:02:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Order-of-values-in-SAS/m-p/774342#M246104</guid>
      <dc:creator>Ronein</dc:creator>
      <dc:date>2021-10-14T20:02:15Z</dc:date>
    </item>
    <item>
      <title>Re: Order of values in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Order-of-values-in-SAS/m-p/774346#M246105</link>
      <description>&lt;P&gt;I found this document that can help to understand how sas sort char values&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ronein_0-1634242019340.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/64725i602AB89FCB97A28E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ronein_0-1634242019340.png" alt="Ronein_0-1634242019340.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Oct 2021 20:07:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Order-of-values-in-SAS/m-p/774346#M246105</guid>
      <dc:creator>Ronein</dc:creator>
      <dc:date>2021-10-14T20:07:35Z</dc:date>
    </item>
  </channel>
</rss>

