<?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: where is wrong in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/where-is-wrong/m-p/740550#M231354</link>
    <description>&lt;P&gt;473&lt;BR /&gt;474 proc means data=work.cleandata36 median;&lt;BR /&gt;475 class group;&lt;BR /&gt;476 var kilograms;&lt;BR /&gt;477 run;&lt;/P&gt;
&lt;P&gt;NOTE: There were 4992 observations read from the data set WORK.CLEANDATA36.&lt;BR /&gt;NOTE: PROCEDURE MEANS used (Total process time):&lt;BR /&gt;real time 0.02 seconds&lt;BR /&gt;cpu time 0.01 seconds&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;478 data results.output36;&lt;BR /&gt;479 set work.cleandata36;&lt;BR /&gt;480 if Kilograms &amp;lt; 40 or Kilograms &amp;gt; 200 then do;&lt;BR /&gt;481 if group='A' then kilograms=79;&lt;BR /&gt;482 else kilograms=89;&lt;BR /&gt;483 end;&lt;BR /&gt;484 run;&lt;/P&gt;
&lt;P&gt;ERROR: Libref RESULTS is not assigned.&lt;BR /&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;BR /&gt;NOTE: DATA statement used (Total process time):&lt;BR /&gt;real time 0.00 seconds&lt;BR /&gt;cpu time 0.01 seconds&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;485 proc means data=results.output36 mean;&lt;BR /&gt;ERROR: Libref RESULTS is not assigned.&lt;BR /&gt;486 class group;&lt;BR /&gt;ERROR: No data set open to look up variables.&lt;BR /&gt;487 var kilograms;&lt;BR /&gt;ERROR: No data set open to look up variables.&lt;BR /&gt;488 run;&lt;/P&gt;
&lt;P&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;BR /&gt;NOTE: PROCEDURE MEANS used (Total process time):&lt;BR /&gt;real time 0.00 seconds&lt;BR /&gt;cpu time 0.00 seconds&lt;/P&gt;</description>
    <pubDate>Tue, 11 May 2021 16:53:31 GMT</pubDate>
    <dc:creator>tianerhu</dc:creator>
    <dc:date>2021-05-11T16:53:31Z</dc:date>
    <item>
      <title>where is wrong</title>
      <link>https://communities.sas.com/t5/SAS-Programming/where-is-wrong/m-p/740535#M231345</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data work.cleandata36;
  set cert.input36;
  group=upcase(group);
  if upcase(group) in ('A','B');
run;

proc means data=work.cleandata36 median;
class group;
var kilograms;
run;
data results.output36;
  set cleandata36;
  if Kilograms &amp;lt; 40 or Kilograms &amp;gt; 200 then do;
  if group='A' then kilograms=79;
  else kilograms=89; 
end;
run;
proc print data = results.output36;
run;

proc means data=results.output36 mean;
  class group;
  var kilograms;
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;output is following:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="tianerhu_0-1620749701857.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/59216i8E5E21420DD09A46/image-size/medium?v=v2&amp;amp;px=400" role="button" title="tianerhu_0-1620749701857.png" alt="tianerhu_0-1620749701857.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;why the third is 'Median' , it would be 'Mean'&amp;nbsp; , because I use Mean option in the code ？&lt;/P&gt;</description>
      <pubDate>Tue, 11 May 2021 16:16:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/where-is-wrong/m-p/740535#M231345</guid>
      <dc:creator>tianerhu</dc:creator>
      <dc:date>2021-05-11T16:16:17Z</dc:date>
    </item>
    <item>
      <title>Re: where is wrong</title>
      <link>https://communities.sas.com/t5/SAS-Programming/where-is-wrong/m-p/740537#M231346</link>
      <description>&lt;P&gt;Your first PROC MEANS specifically asks for MEDIAN.&lt;/P&gt;</description>
      <pubDate>Tue, 11 May 2021 16:22:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/where-is-wrong/m-p/740537#M231346</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2021-05-11T16:22:48Z</dc:date>
    </item>
    <item>
      <title>Re: where is wrong</title>
      <link>https://communities.sas.com/t5/SAS-Programming/where-is-wrong/m-p/740541#M231349</link>
      <description>&lt;P&gt;oh, I see , but , why there isn't a output for the 'proc mean data = results.output36 mean' ?&lt;/P&gt;</description>
      <pubDate>Tue, 11 May 2021 16:38:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/where-is-wrong/m-p/740541#M231349</guid>
      <dc:creator>tianerhu</dc:creator>
      <dc:date>2021-05-11T16:38:10Z</dc:date>
    </item>
    <item>
      <title>Re: where is wrong</title>
      <link>https://communities.sas.com/t5/SAS-Programming/where-is-wrong/m-p/740544#M231350</link>
      <description>Show us the full log from that section of code.</description>
      <pubDate>Tue, 11 May 2021 16:44:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/where-is-wrong/m-p/740544#M231350</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2021-05-11T16:44:34Z</dc:date>
    </item>
    <item>
      <title>Re: where is wrong</title>
      <link>https://communities.sas.com/t5/SAS-Programming/where-is-wrong/m-p/740550#M231354</link>
      <description>&lt;P&gt;473&lt;BR /&gt;474 proc means data=work.cleandata36 median;&lt;BR /&gt;475 class group;&lt;BR /&gt;476 var kilograms;&lt;BR /&gt;477 run;&lt;/P&gt;
&lt;P&gt;NOTE: There were 4992 observations read from the data set WORK.CLEANDATA36.&lt;BR /&gt;NOTE: PROCEDURE MEANS used (Total process time):&lt;BR /&gt;real time 0.02 seconds&lt;BR /&gt;cpu time 0.01 seconds&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;478 data results.output36;&lt;BR /&gt;479 set work.cleandata36;&lt;BR /&gt;480 if Kilograms &amp;lt; 40 or Kilograms &amp;gt; 200 then do;&lt;BR /&gt;481 if group='A' then kilograms=79;&lt;BR /&gt;482 else kilograms=89;&lt;BR /&gt;483 end;&lt;BR /&gt;484 run;&lt;/P&gt;
&lt;P&gt;ERROR: Libref RESULTS is not assigned.&lt;BR /&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;BR /&gt;NOTE: DATA statement used (Total process time):&lt;BR /&gt;real time 0.00 seconds&lt;BR /&gt;cpu time 0.01 seconds&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;485 proc means data=results.output36 mean;&lt;BR /&gt;ERROR: Libref RESULTS is not assigned.&lt;BR /&gt;486 class group;&lt;BR /&gt;ERROR: No data set open to look up variables.&lt;BR /&gt;487 var kilograms;&lt;BR /&gt;ERROR: No data set open to look up variables.&lt;BR /&gt;488 run;&lt;/P&gt;
&lt;P&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;BR /&gt;NOTE: PROCEDURE MEANS used (Total process time):&lt;BR /&gt;real time 0.00 seconds&lt;BR /&gt;cpu time 0.00 seconds&lt;/P&gt;</description>
      <pubDate>Tue, 11 May 2021 16:53:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/where-is-wrong/m-p/740550#M231354</guid>
      <dc:creator>tianerhu</dc:creator>
      <dc:date>2021-05-11T16:53:31Z</dc:date>
    </item>
    <item>
      <title>Re: where is wrong</title>
      <link>https://communities.sas.com/t5/SAS-Programming/where-is-wrong/m-p/740551#M231355</link>
      <description>So now you can see why it didn't display anything. You forgot to assign your RESULTS library.</description>
      <pubDate>Tue, 11 May 2021 16:57:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/where-is-wrong/m-p/740551#M231355</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2021-05-11T16:57:01Z</dc:date>
    </item>
    <item>
      <title>Re: where is wrong</title>
      <link>https://communities.sas.com/t5/SAS-Programming/where-is-wrong/m-p/740554#M231357</link>
      <description>&lt;P&gt;Now it works well .&amp;nbsp; Thank you for your help .&lt;/P&gt;</description>
      <pubDate>Tue, 11 May 2021 17:04:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/where-is-wrong/m-p/740554#M231357</guid>
      <dc:creator>tianerhu</dc:creator>
      <dc:date>2021-05-11T17:04:28Z</dc:date>
    </item>
    <item>
      <title>Re: where is wrong</title>
      <link>https://communities.sas.com/t5/SAS-Programming/where-is-wrong/m-p/740555#M231358</link>
      <description>Thank you for your help.</description>
      <pubDate>Tue, 11 May 2021 17:05:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/where-is-wrong/m-p/740555#M231358</guid>
      <dc:creator>tianerhu</dc:creator>
      <dc:date>2021-05-11T17:05:09Z</dc:date>
    </item>
  </channel>
</rss>

