<?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: BY variables are not properly sorted on data set in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/BY-variables-are-not-properly-sorted-on-data-set/m-p/860678#M339991</link>
    <description>&lt;P&gt;What type of library is PHW2022?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Your PROC SORT attempts to sort the data "in place", which means the output of the sort step will replace the table your are sorting. I recommend that you specify an OUT= table instead (if you can) to create a separate sorted table.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If your source library is a database (not a SAS data set), then the sort step may not be necessary and certainly isn't the same as a standard SAS data set file.&lt;/P&gt;</description>
    <pubDate>Fri, 24 Feb 2023 14:26:31 GMT</pubDate>
    <dc:creator>ChrisHemedinger</dc:creator>
    <dc:date>2023-02-24T14:26:31Z</dc:date>
    <item>
      <title>BY variables are not properly sorted on data set</title>
      <link>https://communities.sas.com/t5/SAS-Programming/BY-variables-are-not-properly-sorted-on-data-set/m-p/860676#M339990</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="qwerty12_0-1677248224327.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/80812i065AFA8DAA94646A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="qwerty12_0-1677248224327.png" alt="qwerty12_0-1677248224327.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="qwerty12_1-1677248327108.png" style="width: 2048px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/80813i6C8DADEA940CFEA5/image-dimensions/2048x99?v=v2" width="2048" height="99" role="button" title="qwerty12_1-1677248327108.png" alt="qwerty12_1-1677248327108.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;can anyone help me out in this&lt;/P&gt;</description>
      <pubDate>Fri, 24 Feb 2023 14:19:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/BY-variables-are-not-properly-sorted-on-data-set/m-p/860676#M339990</guid>
      <dc:creator>qwerty12</dc:creator>
      <dc:date>2023-02-24T14:19:58Z</dc:date>
    </item>
    <item>
      <title>Re: BY variables are not properly sorted on data set</title>
      <link>https://communities.sas.com/t5/SAS-Programming/BY-variables-are-not-properly-sorted-on-data-set/m-p/860678#M339991</link>
      <description>&lt;P&gt;What type of library is PHW2022?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Your PROC SORT attempts to sort the data "in place", which means the output of the sort step will replace the table your are sorting. I recommend that you specify an OUT= table instead (if you can) to create a separate sorted table.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If your source library is a database (not a SAS data set), then the sort step may not be necessary and certainly isn't the same as a standard SAS data set file.&lt;/P&gt;</description>
      <pubDate>Fri, 24 Feb 2023 14:26:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/BY-variables-are-not-properly-sorted-on-data-set/m-p/860678#M339991</guid>
      <dc:creator>ChrisHemedinger</dc:creator>
      <dc:date>2023-02-24T14:26:31Z</dc:date>
    </item>
    <item>
      <title>Re: BY variables are not properly sorted on data set</title>
      <link>https://communities.sas.com/t5/SAS-Programming/BY-variables-are-not-properly-sorted-on-data-set/m-p/860679#M339992</link>
      <description>&lt;P&gt;I don't think you can get that error from PROC SORT.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Read your log carefully and make sure that your sorted the dataset you intend to sort, and that the BY statement lists the variables in the same order as the BY statement of your data step that reads the data.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you can post the full log showing the PROC SORT step and the step that generates the error, people will be able to help more.&lt;/P&gt;</description>
      <pubDate>Fri, 24 Feb 2023 14:28:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/BY-variables-are-not-properly-sorted-on-data-set/m-p/860679#M339992</guid>
      <dc:creator>Quentin</dc:creator>
      <dc:date>2023-02-24T14:28:44Z</dc:date>
    </item>
    <item>
      <title>Re: BY variables are not properly sorted on data set</title>
      <link>https://communities.sas.com/t5/SAS-Programming/BY-variables-are-not-properly-sorted-on-data-set/m-p/860687#M339994</link>
      <description>&lt;P&gt;PROC SORT cannot cause this ERROR, as its purpose is always to sort an&amp;nbsp;&lt;EM&gt;unsorted&lt;/EM&gt; dataset.&lt;/P&gt;
&lt;P&gt;Please post your&amp;nbsp;&lt;U&gt;complete&lt;/U&gt; log (all code and messages) from PROC SORT to the occurrence of the ERROR by copy/pasting the log&amp;nbsp;&lt;EM&gt;text&lt;/EM&gt; into a window opened with this button:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Bildschirmfoto 2020-04-07 um 08.32.59.jpg" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/54552i914D97BE1B0F21E5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Bildschirmfoto 2020-04-07 um 08.32.59.jpg" alt="Bildschirmfoto 2020-04-07 um 08.32.59.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Do NOT post code, logs or data as pictures. ALWAYS post text which we can copy into our SAS environment.&lt;/P&gt;</description>
      <pubDate>Fri, 24 Feb 2023 14:54:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/BY-variables-are-not-properly-sorted-on-data-set/m-p/860687#M339994</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2023-02-24T14:54:52Z</dc:date>
    </item>
    <item>
      <title>Re: BY variables are not properly sorted on data set</title>
      <link>https://communities.sas.com/t5/SAS-Programming/BY-variables-are-not-properly-sorted-on-data-set/m-p/860700#M339998</link>
      <description>&lt;P&gt;What code did you execute between that sort and the step that caused that error? A very likely cause of this error is a step between the sort and the code you ran that actually generated the error. Or opening the set in a table view and sorting interactively.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please don't show pictures of code or log. Copy the text from the editor or log window, open a text box on the forum using the &amp;lt;/&amp;gt; icon and paste the text.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If we need to make substantial changes to your code to fix a problem then it is much easier if we can edit text. If we have to retype code the longer it is the more likely you won't get a working solution from pictures.&lt;/P&gt;</description>
      <pubDate>Fri, 24 Feb 2023 15:27:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/BY-variables-are-not-properly-sorted-on-data-set/m-p/860700#M339998</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2023-02-24T15:27:24Z</dc:date>
    </item>
  </channel>
</rss>

