<?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 is not correct in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Sorting-is-not-correct/m-p/849505#M335846</link>
    <description>&lt;P&gt;Run this program on your dataset and check the sort information:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc contents data = MyDataset;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;It should look similar to this:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SASKiwi_0-1670962887026.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/78466i98F6F5CCDA57D888/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SASKiwi_0-1670962887026.png" alt="SASKiwi_0-1670962887026.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;If your results don't show any sort information then your SORT didn't work.&lt;/P&gt;</description>
    <pubDate>Tue, 13 Dec 2022 20:23:05 GMT</pubDate>
    <dc:creator>SASKiwi</dc:creator>
    <dc:date>2022-12-13T20:23:05Z</dc:date>
    <item>
      <title>Sorting is not correct</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Sorting-is-not-correct/m-p/849352#M335805</link>
      <description>&lt;P&gt;I had a char variable in my dataset where I changed it to be numeric. When I sort the dataset by this new numeric variable, the sort is not quite right. What I mean is that, to some point, the sort is correct but then, it has a record that does not fit the sort order than another "correct" sort start.&lt;BR /&gt;&lt;BR /&gt;For example:&lt;BR /&gt;&lt;BR /&gt;20&lt;BR /&gt;21&lt;BR /&gt;22&lt;BR /&gt;23&lt;BR /&gt;24&lt;BR /&gt;25&lt;BR /&gt;10&lt;BR /&gt;11&lt;BR /&gt;12&lt;BR /&gt;13&lt;BR /&gt;&lt;BR /&gt;What ould cause this and how to solve this?&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Dec 2022 09:32:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Sorting-is-not-correct/m-p/849352#M335805</guid>
      <dc:creator>znhnm</dc:creator>
      <dc:date>2022-12-13T09:32:16Z</dc:date>
    </item>
    <item>
      <title>Re: Sorting is not correct</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Sorting-is-not-correct/m-p/849353#M335806</link>
      <description>&lt;P&gt;Can you post the code or some come that resembles your problem?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Are you sure your sort only by the numeric variable? And are you sure that the variable is actually numeric? Is the data formated?&lt;/P&gt;</description>
      <pubDate>Tue, 13 Dec 2022 09:34:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Sorting-is-not-correct/m-p/849353#M335806</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2022-12-13T09:34:39Z</dc:date>
    </item>
    <item>
      <title>Re: Sorting is not correct</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Sorting-is-not-correct/m-p/849361#M335809</link>
      <description>&lt;P&gt;Very likely something related to your data.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Instructions here: &lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-data-AKA-generate/ta-p/258712" target="_blank"&gt;https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-data-AKA-generate/ta-p/258712&lt;/A&gt; will show how to turn an existing SAS data set into data step code that can be pasted into a forum code box using the &amp;lt;/&amp;gt; icon or attached as text to show exactly what you have and that we can test code against.&lt;/P&gt;</description>
      <pubDate>Tue, 13 Dec 2022 10:33:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Sorting-is-not-correct/m-p/849361#M335809</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2022-12-13T10:33:38Z</dc:date>
    </item>
    <item>
      <title>Re: Sorting is not correct</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Sorting-is-not-correct/m-p/849505#M335846</link>
      <description>&lt;P&gt;Run this program on your dataset and check the sort information:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc contents data = MyDataset;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;It should look similar to this:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SASKiwi_0-1670962887026.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/78466i98F6F5CCDA57D888/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SASKiwi_0-1670962887026.png" alt="SASKiwi_0-1670962887026.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;If your results don't show any sort information then your SORT didn't work.&lt;/P&gt;</description>
      <pubDate>Tue, 13 Dec 2022 20:23:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Sorting-is-not-correct/m-p/849505#M335846</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2022-12-13T20:23:05Z</dc:date>
    </item>
  </channel>
</rss>

