<?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:Data set, Please reply me ASAP in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Re-Data-set-Please-reply-me-ASAP/m-p/53683#M11340</link>
    <description>First, sort you data by id and descending sal.&lt;BR /&gt;
Then go through your data with a data step, counting no of observations in each by-group and output the first five each. You can accomplish this using first.id and a retain variable.&lt;BR /&gt;
&lt;BR /&gt;
/Linus</description>
    <pubDate>Tue, 14 Oct 2008 06:53:21 GMT</pubDate>
    <dc:creator>LinusH</dc:creator>
    <dc:date>2008-10-14T06:53:21Z</dc:date>
    <item>
      <title>Re:Data set, Please reply me ASAP</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Re-Data-set-Please-reply-me-ASAP/m-p/53682#M11339</link>
      <description>This is my input data set with 2 variables id and sal and my output should only contain top 5 observations for each id value. &lt;BR /&gt;
Input Data set:&lt;BR /&gt;
data sam;&lt;BR /&gt;
input id sal;&lt;BR /&gt;
cards;&lt;BR /&gt;
1 4000&lt;BR /&gt;
1 4000&lt;BR /&gt;
1 4000&lt;BR /&gt;
2 5000&lt;BR /&gt;
2 6000&lt;BR /&gt;
2 3000&lt;BR /&gt;
2 3000&lt;BR /&gt;
2 3000&lt;BR /&gt;
2 3000&lt;BR /&gt;
2 3000&lt;BR /&gt;
2 3000&lt;BR /&gt;
3 5000&lt;BR /&gt;
3 5000&lt;BR /&gt;
3 5000&lt;BR /&gt;
3 5000&lt;BR /&gt;
3 5000&lt;BR /&gt;
3 5000&lt;BR /&gt;
3 5000&lt;BR /&gt;
4 6000&lt;BR /&gt;
4 6000&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
Output Dataset:&lt;BR /&gt;
&lt;BR /&gt;
1 4000&lt;BR /&gt;
1 4000&lt;BR /&gt;
1 4000&lt;BR /&gt;
2 5000&lt;BR /&gt;
2 6000&lt;BR /&gt;
2 3000&lt;BR /&gt;
2 3000&lt;BR /&gt;
2 3000&lt;BR /&gt;
3 5000&lt;BR /&gt;
3 5000&lt;BR /&gt;
3 5000&lt;BR /&gt;
3 5000&lt;BR /&gt;
3 5000&lt;BR /&gt;
4 6000&lt;BR /&gt;
4 6000</description>
      <pubDate>Tue, 14 Oct 2008 05:11:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Re-Data-set-Please-reply-me-ASAP/m-p/53682#M11339</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2008-10-14T05:11:56Z</dc:date>
    </item>
    <item>
      <title>Re:Data set, Please reply me ASAP</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Re-Data-set-Please-reply-me-ASAP/m-p/53683#M11340</link>
      <description>First, sort you data by id and descending sal.&lt;BR /&gt;
Then go through your data with a data step, counting no of observations in each by-group and output the first five each. You can accomplish this using first.id and a retain variable.&lt;BR /&gt;
&lt;BR /&gt;
/Linus</description>
      <pubDate>Tue, 14 Oct 2008 06:53:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Re-Data-set-Please-reply-me-ASAP/m-p/53683#M11340</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2008-10-14T06:53:21Z</dc:date>
    </item>
    <item>
      <title>Re:Data set, Please reply me ASAP</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Re-Data-set-Please-reply-me-ASAP/m-p/53684#M11341</link>
      <description>Hi Linus,&lt;BR /&gt;
&lt;BR /&gt;
Thank you very much for ur reply.&lt;BR /&gt;
&lt;BR /&gt;
sam</description>
      <pubDate>Tue, 14 Oct 2008 08:03:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Re-Data-set-Please-reply-me-ASAP/m-p/53684#M11341</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2008-10-14T08:03:05Z</dc:date>
    </item>
  </channel>
</rss>

