<?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: The data set is not sorted in ascending sequence. in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/The-data-set-is-not-sorted-in-ascending-sequence/m-p/544974#M7967</link>
    <description>&lt;P&gt;Total sorts after the numbers, in the default SAS sort order.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So, when total comes first, it is not in the proper sorted order.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To fix this, use either:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;by harvest notsorted;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;OR&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;class harvest;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 21 Mar 2019 18:14:13 GMT</pubDate>
    <dc:creator>PaigeMiller</dc:creator>
    <dc:date>2019-03-21T18:14:13Z</dc:date>
    <item>
      <title>The data set is not sorted in ascending sequence.</title>
      <link>https://communities.sas.com/t5/New-SAS-User/The-data-set-is-not-sorted-in-ascending-sequence/m-p/544971#M7966</link>
      <description>&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to gather the means and standard errors of harvest yields from my data. I have entered the following code...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT color="#000080"&gt;proc sort&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#0000FF"&gt;data&lt;/FONT&gt;=WORK.SSG2016harvests;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;by&lt;/FONT&gt; legume trt harvest;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT color="#000080"&gt;proc means&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#0000FF"&gt;data&lt;/FONT&gt;=WORK.SSG2016harvests &lt;FONT color="#0000FF"&gt;mean&lt;/FONT&gt; &lt;FONT color="#0000FF"&gt;stderr&lt;/FONT&gt;;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;var&lt;/FONT&gt; sorgyd;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;by&lt;/FONT&gt; harvest;&lt;BR /&gt;output out = c mean=sorgyd sorgSE;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT color="#000080"&gt;run&lt;/FONT&gt;&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, I keep receiving the following error message when I try to run it...&lt;/P&gt;&lt;DIV class="sasError"&gt;&lt;DIV class="sasError"&gt;&lt;FONT color="#FF0000"&gt;ERROR: Data set WORK.SSG2016HARVESTS is not sorted in ascending sequence. The current BY group has Harvest = Total and the next BY&amp;nbsp;group has Harvest = 1.&lt;/FONT&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class="sasError"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasError"&gt;There are 5 different harvests labeled as 1, 2, 3, 4, total.&lt;/DIV&gt;&lt;DIV class="sasError"&gt;I am stumped on how to solve this, and appreciate some input!&lt;/DIV&gt;&lt;DIV class="sasError"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasError"&gt;&lt;FONT color="#000000"&gt;Thank you!&lt;/FONT&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 21 Mar 2019 18:04:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/The-data-set-is-not-sorted-in-ascending-sequence/m-p/544971#M7966</guid>
      <dc:creator>Martina4</dc:creator>
      <dc:date>2019-03-21T18:04:14Z</dc:date>
    </item>
    <item>
      <title>Re: The data set is not sorted in ascending sequence.</title>
      <link>https://communities.sas.com/t5/New-SAS-User/The-data-set-is-not-sorted-in-ascending-sequence/m-p/544974#M7967</link>
      <description>&lt;P&gt;Total sorts after the numbers, in the default SAS sort order.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So, when total comes first, it is not in the proper sorted order.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To fix this, use either:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;by harvest notsorted;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;OR&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;class harvest;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 21 Mar 2019 18:14:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/The-data-set-is-not-sorted-in-ascending-sequence/m-p/544974#M7967</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2019-03-21T18:14:13Z</dc:date>
    </item>
    <item>
      <title>Re: The data set is not sorted in ascending sequence.</title>
      <link>https://communities.sas.com/t5/New-SAS-User/The-data-set-is-not-sorted-in-ascending-sequence/m-p/544983#M7969</link>
      <description>&lt;P&gt;There are two issues to attend to.&amp;nbsp; First, what groupings do you want statistics for?&amp;nbsp; For each harvest?&amp;nbsp; Then use:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;by harvest;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But use that in BOTH procedures, don't change it from one procedure to the next.&amp;nbsp; On the other hand, if you want separate statistics for each treatment within each procedure, use:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;by trt harvest;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Again, use the same BY statement for BOTH procedures.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The other issue is the request for the standard errors.&amp;nbsp; You have to specify which statistic you are asking for.&amp;nbsp; So the OUTPUT statement would look like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;output out=c mean=sorgyd stderr=sorgSE;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Mar 2019 18:38:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/The-data-set-is-not-sorted-in-ascending-sequence/m-p/544983#M7969</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2019-03-21T18:38:05Z</dc:date>
    </item>
  </channel>
</rss>

