<?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: Can't get a simply BY grouping to work. Please help! in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Can-t-get-a-simply-BY-grouping-to-work-Please-help/m-p/314104#M68351</link>
    <description>&lt;P&gt;Yes, by group just means to do something for each group specified, it doesn't remove any variables. &amp;nbsp;Perhaps you mean to sort the dataset using nodupkey:&lt;/P&gt;
&lt;PRE&gt;proc sort data=sashelp.cars out=work.temp2 (keep = make) nodupkey;
  by make;
run;
proc print data = work.temp2;
run;&lt;/PRE&gt;
&lt;P&gt;The nodupkey options will remove any subsequent observations from each by group.&lt;/P&gt;</description>
    <pubDate>Thu, 24 Nov 2016 14:40:37 GMT</pubDate>
    <dc:creator>RW9</dc:creator>
    <dc:date>2016-11-24T14:40:37Z</dc:date>
    <item>
      <title>Can't get a simply BY grouping to work. Please help!</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Can-t-get-a-simply-BY-grouping-to-work-Please-help/m-p/314103#M68350</link>
      <description>&lt;P&gt;Hello I havent used SAS in a while, and want to attain a basic programmer cert.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to get this grouping to work from sashelp.cars but it is giving me all 128 observations in the output. I see repeated valuesfor the BY variable make&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc sort data=sashelp.cars out=work.temp2 (keep = make);&lt;BR /&gt;by make;&lt;BR /&gt;run;&lt;BR /&gt;proc print data = work.temp2;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;any suggestions?&lt;/P&gt;</description>
      <pubDate>Thu, 24 Nov 2016 14:36:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Can-t-get-a-simply-BY-grouping-to-work-Please-help/m-p/314103#M68350</guid>
      <dc:creator>hfakoor</dc:creator>
      <dc:date>2016-11-24T14:36:23Z</dc:date>
    </item>
    <item>
      <title>Re: Can't get a simply BY grouping to work. Please help!</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Can-t-get-a-simply-BY-grouping-to-work-Please-help/m-p/314104#M68351</link>
      <description>&lt;P&gt;Yes, by group just means to do something for each group specified, it doesn't remove any variables. &amp;nbsp;Perhaps you mean to sort the dataset using nodupkey:&lt;/P&gt;
&lt;PRE&gt;proc sort data=sashelp.cars out=work.temp2 (keep = make) nodupkey;
  by make;
run;
proc print data = work.temp2;
run;&lt;/PRE&gt;
&lt;P&gt;The nodupkey options will remove any subsequent observations from each by group.&lt;/P&gt;</description>
      <pubDate>Thu, 24 Nov 2016 14:40:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Can-t-get-a-simply-BY-grouping-to-work-Please-help/m-p/314104#M68351</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2016-11-24T14:40:37Z</dc:date>
    </item>
    <item>
      <title>Re: Can't get a simply BY grouping to work. Please help!</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Can-t-get-a-simply-BY-grouping-to-work-Please-help/m-p/314107#M68353</link>
      <description>&lt;P&gt;thanks so much-&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I wanted to sum msrp against Make grouping how would I go about that?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;my code below is still giving me all 428 obs in the output.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc sort data=sashelp.cars out=work.temp2 (keep = make msrp);&lt;BR /&gt;by make;&lt;BR /&gt;run;&lt;BR /&gt;proc print data = work.temp2;&lt;BR /&gt;sum msrp;&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Nov 2016 14:44:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Can-t-get-a-simply-BY-grouping-to-work-Please-help/m-p/314107#M68353</guid>
      <dc:creator>hfakoor</dc:creator>
      <dc:date>2016-11-24T14:44:28Z</dc:date>
    </item>
    <item>
      <title>Re: Can't get a simply BY grouping to work. Please help!</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Can-t-get-a-simply-BY-grouping-to-work-Please-help/m-p/314109#M68355</link>
      <description>this seemed to work.&lt;BR /&gt;&lt;BR /&gt;proc sort data=sashelp.cars out=work.temp2 (keep = make msrp) nodupekey;&lt;BR /&gt;by make;&lt;BR /&gt;run;&lt;BR /&gt;proc print data = work.temp2;&lt;BR /&gt;sum msrp;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;coming from the world of sql I was really looking for a way to just group the output and supress repeated by variables as opposed to supressing them in the output data itself.&lt;BR /&gt;&lt;BR /&gt;Is there a way to do that?</description>
      <pubDate>Thu, 24 Nov 2016 14:50:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Can-t-get-a-simply-BY-grouping-to-work-Please-help/m-p/314109#M68355</guid>
      <dc:creator>hfakoor</dc:creator>
      <dc:date>2016-11-24T14:50:11Z</dc:date>
    </item>
    <item>
      <title>Re: Can't get a simply BY grouping to work. Please help!</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Can-t-get-a-simply-BY-grouping-to-work-Please-help/m-p/314110#M68356</link>
      <description>&lt;P&gt;The option is nodupkey.&lt;/P&gt;
&lt;P&gt;If your familiar with SQL then use proc sql:&lt;/P&gt;
&lt;PRE&gt;proc sql;
  create table WANT as
  select  MAKE,
          sum(MSRP) as RES
  from    SASHELP.CARS
  group by MAKE;
quit;&lt;/PRE&gt;</description>
      <pubDate>Thu, 24 Nov 2016 14:52:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Can-t-get-a-simply-BY-grouping-to-work-Please-help/m-p/314110#M68356</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2016-11-24T14:52:43Z</dc:date>
    </item>
  </channel>
</rss>

