<?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: output out using proc means in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/output-out-using-proc-means/m-p/517103#M73308</link>
    <description>&lt;P&gt;1.6million observations will take a long time to run, there is no workaround unless you can reduce the number of observations.&amp;nbsp; Just leave it until its done.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 29 Nov 2018 15:57:50 GMT</pubDate>
    <dc:creator>RW9</dc:creator>
    <dc:date>2018-11-29T15:57:50Z</dc:date>
    <item>
      <title>output out using proc means</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/output-out-using-proc-means/m-p/517085#M73304</link>
      <description>&lt;P&gt;Hi all&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to know what is wrong with this code, I'm quite sure this code is correct but it may be the issue&amp;nbsp;because&amp;nbsp;of the big sample size, I have 1.6 million observation. So, What is the best idea&amp;nbsp;to solve this problem.&amp;nbsp;&lt;/P&gt;&lt;P&gt;when I submit this code, after few minutes the system showing proc means not responding.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;regards&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ibrahim&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sort data = have;
	by year month week;
	run; quit;

	proc means data = have;
	by year month week;
	output out = want sum(FATKG)= FAT_KG SUM(PROTKG)= PROT_KG SUM(MILKKG)= MILK_KG;
	RUN; QUIT;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 29 Nov 2018 15:31:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/output-out-using-proc-means/m-p/517085#M73304</guid>
      <dc:creator>Barkamih</dc:creator>
      <dc:date>2018-11-29T15:31:49Z</dc:date>
    </item>
    <item>
      <title>Re: output out using proc means</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/output-out-using-proc-means/m-p/517103#M73308</link>
      <description>&lt;P&gt;1.6million observations will take a long time to run, there is no workaround unless you can reduce the number of observations.&amp;nbsp; Just leave it until its done.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 29 Nov 2018 15:57:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/output-out-using-proc-means/m-p/517103#M73308</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2018-11-29T15:57:50Z</dc:date>
    </item>
    <item>
      <title>Re: output out using proc means</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/output-out-using-proc-means/m-p/517120#M73310</link>
      <description>You may want to suppress the output though - use NOPRINT. Generating that type of output can take a lot of time. If it sorted fine though, I'd expect PROC MEANS to run fine. And 1.6 million rows should complete in under 5 minutes in my experience (SAS UE is still less than a minute for me). &lt;BR /&gt;&lt;BR /&gt;If you have a lot of variables, you can try dropping the variables you don't need in a data set option to make it faster. Not sure if that helps but worth a shot.</description>
      <pubDate>Thu, 29 Nov 2018 16:25:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/output-out-using-proc-means/m-p/517120#M73310</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-11-29T16:25:58Z</dc:date>
    </item>
    <item>
      <title>Re: output out using proc means</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/output-out-using-proc-means/m-p/517126#M73311</link>
      <description>&lt;P&gt;It's not clear how many numeric variables exist in your data set.&amp;nbsp; Without a VAR statement, the default is to compute statistics for every numeric variable.&amp;nbsp; PROC MEANS might be "intelligent" enough to figure out that you only need statistics computed for 3 variables ... but it might not figure that out.&amp;nbsp; You might fix the problem just by adding to PROC MEANS:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;var fatkg protkg milkkg;&lt;/P&gt;</description>
      <pubDate>Thu, 29 Nov 2018 16:32:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/output-out-using-proc-means/m-p/517126#M73311</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2018-11-29T16:32:38Z</dc:date>
    </item>
    <item>
      <title>Re: output out using proc means</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/output-out-using-proc-means/m-p/517128#M73312</link>
      <description>&lt;P&gt;I think&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/4954"&gt;@Astounding&lt;/a&gt;&amp;nbsp;hit the nail on the head there. If you don't specify NOPRINT or VAR it will analyze all numeric variables and put that in the results&amp;nbsp;window - and that will take time. So adding NOPRINT &amp;amp; a VAR statement should speed things up a lot.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sort data = have;
by year month week;
run; 

proc means data = have &lt;FONT size="4" color="#800080"&gt;&lt;STRONG&gt;NOPRINT&lt;/STRONG&gt;&lt;/FONT&gt;;
by year month week;
&lt;FONT size="4" color="#800080"&gt;&lt;STRONG&gt;var FATKG PROTKG MILKKG;&lt;/STRONG&gt;&lt;/FONT&gt;
output out = want sum(FATKG)= FAT_KG SUM(PROTKG)= PROT_KG SUM(MILKKG)= MILK_KG;
RUN; &lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/4954"&gt;@Astounding&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;It's not clear how many numeric variables exist in your data set.&amp;nbsp; Without a VAR statement, the default is to compute statistics for every numeric variable.&amp;nbsp; PROC MEANS might be "intelligent" enough to figure out that you only need statistics computed for 3 variables ... but it might not figure that out.&amp;nbsp; You might fix the problem just by adding to PROC MEANS:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;var fatkg protkg milkkg;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 29 Nov 2018 16:37:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/output-out-using-proc-means/m-p/517128#M73312</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-11-29T16:37:01Z</dc:date>
    </item>
    <item>
      <title>Re: output out using proc means</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/output-out-using-proc-means/m-p/517138#M73313</link>
      <description>&lt;P&gt;&amp;nbsp;I appreciate your&amp;nbsp;help&amp;nbsp;my&amp;nbsp; SAS friends HAHAHAH,&amp;nbsp; now everything is fine and I got what I'm looking for.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thank you very much again&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ibrahim&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;regards&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 29 Nov 2018 16:47:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/output-out-using-proc-means/m-p/517138#M73313</guid>
      <dc:creator>Barkamih</dc:creator>
      <dc:date>2018-11-29T16:47:30Z</dc:date>
    </item>
  </channel>
</rss>

