<?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: proc means with proc format in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/proc-means-with-proc-format/m-p/485414#M126115</link>
    <description>&lt;P&gt;First of all, remember to control your ranges. Eg, what group did you expect the value 10 to be in? Do like this&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc format;
value ffmt
0-10='0-10'
10&amp;lt;-50='10-50'
50&amp;lt;-100='50-100'
100&amp;lt;-high='100+'
;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Also, what is wrong with your output data set? When I run this, I see exactly the groups you have defined?&lt;/P&gt;</description>
    <pubDate>Thu, 09 Aug 2018 11:05:53 GMT</pubDate>
    <dc:creator>PeterClemmensen</dc:creator>
    <dc:date>2018-08-09T11:05:53Z</dc:date>
    <item>
      <title>proc means with proc format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-means-with-proc-format/m-p/485403#M126112</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;I am using proc means with proc format.&lt;/P&gt;&lt;P&gt;In the output data set in column&amp;nbsp;x &amp;nbsp;I can't see the groups that&amp;nbsp; I defined in proc format.&lt;/P&gt;&lt;P&gt;Why?&lt;/P&gt;&lt;P&gt;How can I solve it?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc format;
value ffmt
0-10='0-10'
10-50='10-50'
50-100='50-100'
100-high='100+'
;
run;
data tbl;
input ID x  y;
cards;
1 0 100
2 5 110
3 30 120
4 40 130
5 50 140
6 60 150
7 70 160
8 80 170
9 90 180
10 110 190
;
run;
proc means data=tbl nway noprint;
class x;
var y;
format x  ffmt.;
output out=output sum(y)=sum_y;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 09 Aug 2018 10:56:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-means-with-proc-format/m-p/485403#M126112</guid>
      <dc:creator>Ronein</dc:creator>
      <dc:date>2018-08-09T10:56:19Z</dc:date>
    </item>
    <item>
      <title>Re: proc means with proc format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-means-with-proc-format/m-p/485414#M126115</link>
      <description>&lt;P&gt;First of all, remember to control your ranges. Eg, what group did you expect the value 10 to be in? Do like this&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc format;
value ffmt
0-10='0-10'
10&amp;lt;-50='10-50'
50&amp;lt;-100='50-100'
100&amp;lt;-high='100+'
;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Also, what is wrong with your output data set? When I run this, I see exactly the groups you have defined?&lt;/P&gt;</description>
      <pubDate>Thu, 09 Aug 2018 11:05:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-means-with-proc-format/m-p/485414#M126115</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2018-08-09T11:05:53Z</dc:date>
    </item>
    <item>
      <title>Re: proc means with proc format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-means-with-proc-format/m-p/485416#M126116</link>
      <description>&lt;P&gt;The FORMAT statement within PROC MEANS has a temporary effect.&amp;nbsp; It groups the CLASS variable while PROC MEANS runs, but it does not permanently associate the CLASS variable with the format.&amp;nbsp; You would need to repeat the FORMAT statement in a later step to see the formatted values instead of the actual values.&lt;/P&gt;</description>
      <pubDate>Thu, 09 Aug 2018 11:07:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-means-with-proc-format/m-p/485416#M126116</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2018-08-09T11:07:42Z</dc:date>
    </item>
    <item>
      <title>Re: proc means with proc format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-means-with-proc-format/m-p/485417#M126117</link>
      <description>&lt;P&gt;Works for me:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc format;
value ffmt
0-10='0-10'
10-50='10-50'
50&amp;lt;-100='50-100'
100&amp;lt;-high='100+'
;
run;
data tbl;
input ID x  y;
cards;
1 0 100
2 5 110
3 30 120
4 40 130
5 50 140
6 60 150
7 70 160
8 80 170
9 90 180
10 110 190
;
run;
proc means data=tbl nway noprint;
class x;
var y;
format x  ffmt.;
output out=output sum(y)=sum_y;
run;

proc print data=output noobs;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Result:&lt;/P&gt;
&lt;PRE&gt;  x       _TYPE_    _FREQ_    sum_y

0-10         1         2       210 
10-50        1         3       390 
50-100       1         4       660 
100+         1         1       190 
&lt;/PRE&gt;</description>
      <pubDate>Thu, 09 Aug 2018 11:09:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-means-with-proc-format/m-p/485417#M126117</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-08-09T11:09:50Z</dc:date>
    </item>
    <item>
      <title>Re: proc means with proc format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-means-with-proc-format/m-p/485515#M126154</link>
      <description>&lt;P&gt;How did you examine the OUTPUT data set?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;The output I get when using proc print on the output data set is:&lt;/P&gt;
&lt;P&gt;Proc print data=output noobs;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV class="branch"&gt;
&lt;DIV&gt;
&lt;DIV align="left"&gt;
&lt;TABLE class="table" cellspacing="0" cellpadding="3" summary="Procedure Print: Data Set USER.OUTPUT"&gt;&lt;COLGROUP&gt; &lt;COL /&gt; &lt;COL /&gt; &lt;COL /&gt; &lt;COL /&gt;&lt;/COLGROUP&gt;
&lt;THEAD&gt;
&lt;TR&gt;
&lt;TH class="c m header" scope="col"&gt;x&lt;/TH&gt;
&lt;TH class="c m header" scope="col"&gt;_TYPE_&lt;/TH&gt;
&lt;TH class="c m header" scope="col"&gt;_FREQ_&lt;/TH&gt;
&lt;TH class="c m header" scope="col"&gt;sum_y&lt;/TH&gt;
&lt;/TR&gt;
&lt;/THEAD&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD class="r data"&gt;0-10&lt;/TD&gt;
&lt;TD class="r data"&gt;1&lt;/TD&gt;
&lt;TD class="r data"&gt;2&lt;/TD&gt;
&lt;TD class="r data"&gt;210&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="r data"&gt;10-50&lt;/TD&gt;
&lt;TD class="r data"&gt;1&lt;/TD&gt;
&lt;TD class="r data"&gt;3&lt;/TD&gt;
&lt;TD class="r data"&gt;390&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="r data"&gt;50-100&lt;/TD&gt;
&lt;TD class="r data"&gt;1&lt;/TD&gt;
&lt;TD class="r data"&gt;4&lt;/TD&gt;
&lt;TD class="r data"&gt;660&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="r data"&gt;100+&lt;/TD&gt;
&lt;TD class="r data"&gt;1&lt;/TD&gt;
&lt;TD class="r data"&gt;1&lt;/TD&gt;
&lt;TD class="r data"&gt;190&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Thu, 09 Aug 2018 15:29:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-means-with-proc-format/m-p/485515#M126154</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-08-09T15:29:08Z</dc:date>
    </item>
    <item>
      <title>Re: proc means with proc format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-means-with-proc-format/m-p/486133#M126418</link>
      <description>&lt;P&gt;If you look at the output data set (and not the output printed) you will see that in X column values are different&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 12 Aug 2018 08:47:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-means-with-proc-format/m-p/486133#M126418</guid>
      <dc:creator>Ronein</dc:creator>
      <dc:date>2018-08-12T08:47:05Z</dc:date>
    </item>
  </channel>
</rss>

