<?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 ERROR: Data set WORK.SORT is not sorted in ascending sequence. The current BY group has (...) in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/ERROR-Data-set-WORK-SORT-is-not-sorted-in-ascending-sequence-The/m-p/811061#M319899</link>
    <description>&lt;P&gt;Hello. I have a problem with the title error. What I've done:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;PROC SORT data=WORK.SORT;&lt;BR /&gt;BY OWNER TARYFA PRODUKT_TARYFA;&lt;BR /&gt;run;&lt;BR /&gt;PROC MEANS data=WORK.SORT;&lt;BR /&gt;BY OWNER TARYFA PRODUKT_TARYFA;&lt;BR /&gt;VAR WOLUMEN_MWH_KONWERSJA;&lt;BR /&gt;OUTPUT OUT=WORK.TEST Q1= Q3= /autoname;&lt;BR /&gt;RUN;&lt;/PRE&gt;
&lt;P&gt;After the above code, I get an error:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;ERROR: Data set WORK.SORT is not sorted in ascending sequence. The current BY group has OWNER = Deweloperzy, Wspólnoty i and the next BY group has OWNER = DEW.&lt;/EM&gt;&lt;/P&gt;
&lt;DIV class="FFpbKc"&gt;&lt;SPAN&gt;Replacing "by" with "class" or adding "notsorted" wouldn't solve problem due to not correct calculations.&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV class="FFpbKc"&gt;&lt;SPAN&gt;Do you have&amp;nbsp;any suggestions?&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 02 May 2022 13:14:47 GMT</pubDate>
    <dc:creator>PatrykSAS</dc:creator>
    <dc:date>2022-05-02T13:14:47Z</dc:date>
    <item>
      <title>ERROR: Data set WORK.SORT is not sorted in ascending sequence. The current BY group has (...)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-Data-set-WORK-SORT-is-not-sorted-in-ascending-sequence-The/m-p/811061#M319899</link>
      <description>&lt;P&gt;Hello. I have a problem with the title error. What I've done:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;PROC SORT data=WORK.SORT;&lt;BR /&gt;BY OWNER TARYFA PRODUKT_TARYFA;&lt;BR /&gt;run;&lt;BR /&gt;PROC MEANS data=WORK.SORT;&lt;BR /&gt;BY OWNER TARYFA PRODUKT_TARYFA;&lt;BR /&gt;VAR WOLUMEN_MWH_KONWERSJA;&lt;BR /&gt;OUTPUT OUT=WORK.TEST Q1= Q3= /autoname;&lt;BR /&gt;RUN;&lt;/PRE&gt;
&lt;P&gt;After the above code, I get an error:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;ERROR: Data set WORK.SORT is not sorted in ascending sequence. The current BY group has OWNER = Deweloperzy, Wspólnoty i and the next BY group has OWNER = DEW.&lt;/EM&gt;&lt;/P&gt;
&lt;DIV class="FFpbKc"&gt;&lt;SPAN&gt;Replacing "by" with "class" or adding "notsorted" wouldn't solve problem due to not correct calculations.&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV class="FFpbKc"&gt;&lt;SPAN&gt;Do you have&amp;nbsp;any suggestions?&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 02 May 2022 13:14:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-Data-set-WORK-SORT-is-not-sorted-in-ascending-sequence-The/m-p/811061#M319899</guid>
      <dc:creator>PatrykSAS</dc:creator>
      <dc:date>2022-05-02T13:14:47Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: Data set WORK.SORT is not sorted in ascending sequence. The current BY group has (...)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-Data-set-WORK-SORT-is-not-sorted-in-ascending-sequence-The/m-p/811062#M319900</link>
      <description>&lt;P&gt;Show the log.&lt;/P&gt;</description>
      <pubDate>Mon, 02 May 2022 13:22:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-Data-set-WORK-SORT-is-not-sorted-in-ascending-sequence-The/m-p/811062#M319900</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2022-05-02T13:22:28Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: Data set WORK.SORT is not sorted in ascending sequence. The current BY group has (...)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-Data-set-WORK-SORT-is-not-sorted-in-ascending-sequence-The/m-p/811065#M319903</link>
      <description>&lt;P&gt;Appears to work fine with some simple test data&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have ;
	input owner $ ;
	do n=1 to 5 ;
		output ;
	end ;
cards ;
Deweloperzy
DEW
;

proc sort data=have out=srtd ;
	by owner ;
run ;

proc means data=srtd ;
	by owner ;
	var n ;
	output out=WORK.have Q1= Q3= /autoname;
RUN;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Log:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;68   data have ;
69       input owner $ ;
70       do n=1 to 5 ;
71           output ;
72       end ;
73   cards ;

NOTE: The data set WORK.HAVE has 10 observations and 2 variables.
NOTE: DATA statement used (Total process time):
      real time           0.01 seconds
      cpu time            0.01 seconds


76   ;
77
78   proc sort data=have out=srtd ;
79       by owner ;
80   run ;

NOTE: There were 10 observations read from the data set WORK.HAVE.
NOTE: The data set WORK.SRTD has 10 observations and 2 variables.
NOTE: PROCEDURE SORT used (Total process time):
      real time           0.00 seconds
      cpu time            0.00 seconds


81
82   proc means data=srtd ;
83       by owner ;
84       var n ;
85       output out=WORK.have Q1= Q3= /autoname;
86   RUN;

NOTE: There were 10 observations read from the data set WORK.SRTD.
NOTE: The data set WORK.HAVE has 2 observations and 5 variables.
NOTE: PROCEDURE MEANS used (Total process time):
      real time           0.02 seconds
      cpu time            0.01 seconds

&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Can you create a simple input "have" dataset to replicate the issue and provide the code and log&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 02 May 2022 13:40:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-Data-set-WORK-SORT-is-not-sorted-in-ascending-sequence-The/m-p/811065#M319903</guid>
      <dc:creator>AMSAS</dc:creator>
      <dc:date>2022-05-02T13:40:35Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: Data set WORK.SORT is not sorted in ascending sequence. The current BY group has (...)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-Data-set-WORK-SORT-is-not-sorted-in-ascending-sequence-The/m-p/811071#M319908</link>
      <description>&lt;P&gt;Only an obscure set of conditions could produce this result.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You would see this easily by reading the log.&amp;nbsp; There should be some sort of message about PROC SORT being skipped.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Always read the log.&amp;nbsp; Always show the log if you expect help instead of a guess.&lt;/P&gt;</description>
      <pubDate>Mon, 02 May 2022 14:18:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-Data-set-WORK-SORT-is-not-sorted-in-ascending-sequence-The/m-p/811071#M319908</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2022-05-02T14:18:52Z</dc:date>
    </item>
  </channel>
</rss>

