<?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 is this below code crt as per the question in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/is-this-below-code-crt-as-per-the-question/m-p/736349#M229376</link>
    <description>&lt;P&gt;sort the input12dataset .First by number in ascending and second by income in descending order.Using input12 dataset with by group processing create test data from the input12 dataset&lt;/P&gt;&lt;P&gt;test 2 dataset must contain only one observation with highest income from each group of distint number value&lt;/P&gt;&lt;P&gt;MY CODE:&lt;/P&gt;&lt;P&gt;proc sort data=input12 out=test;&lt;/P&gt;&lt;P&gt;by number descending income;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;data test;&lt;/P&gt;&lt;P&gt;set test;&lt;/P&gt;&lt;P&gt;by number;&lt;/P&gt;&lt;P&gt;if first.number;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;</description>
    <pubDate>Thu, 22 Apr 2021 08:49:22 GMT</pubDate>
    <dc:creator>username12</dc:creator>
    <dc:date>2021-04-22T08:49:22Z</dc:date>
    <item>
      <title>is this below code crt as per the question</title>
      <link>https://communities.sas.com/t5/SAS-Programming/is-this-below-code-crt-as-per-the-question/m-p/736349#M229376</link>
      <description>&lt;P&gt;sort the input12dataset .First by number in ascending and second by income in descending order.Using input12 dataset with by group processing create test data from the input12 dataset&lt;/P&gt;&lt;P&gt;test 2 dataset must contain only one observation with highest income from each group of distint number value&lt;/P&gt;&lt;P&gt;MY CODE:&lt;/P&gt;&lt;P&gt;proc sort data=input12 out=test;&lt;/P&gt;&lt;P&gt;by number descending income;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;data test;&lt;/P&gt;&lt;P&gt;set test;&lt;/P&gt;&lt;P&gt;by number;&lt;/P&gt;&lt;P&gt;if first.number;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Apr 2021 08:49:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/is-this-below-code-crt-as-per-the-question/m-p/736349#M229376</guid>
      <dc:creator>username12</dc:creator>
      <dc:date>2021-04-22T08:49:22Z</dc:date>
    </item>
    <item>
      <title>Re: is this below code crt as per the question</title>
      <link>https://communities.sas.com/t5/SAS-Programming/is-this-below-code-crt-as-per-the-question/m-p/736392#M229395</link>
      <description>&lt;P&gt;Works, but I would specify the sorting order in want to make sure&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
infile datalines;
input number income;
datalines;
1 100
1 130
1 120
1 110
2 250
2 200
3 300
4 420
4 410
4 430
4 440
4 450
5 530
5 520
5 510
5 500
8 800
;
run;

proc sort data=have out=haves;
   by number descending income;
run;

data want;
set haves;
by number descending income;
if first.number;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 22 Apr 2021 13:45:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/is-this-below-code-crt-as-per-the-question/m-p/736392#M229395</guid>
      <dc:creator>Oligolas</dc:creator>
      <dc:date>2021-04-22T13:45:17Z</dc:date>
    </item>
  </channel>
</rss>

