<?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: Count of repititve amount by month and account number in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Count-of-repititve-amount-by-month-and-account-number/m-p/34244#M8321</link>
    <description>Hi, Slone &lt;BR /&gt;
Thankyou!</description>
    <pubDate>Wed, 20 May 2009 11:15:39 GMT</pubDate>
    <dc:creator>LOK</dc:creator>
    <dc:date>2009-05-20T11:15:39Z</dc:date>
    <item>
      <title>Count of repititve amount by month and account number</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Count-of-repititve-amount-by-month-and-account-number/m-p/34242#M8319</link>
      <description>Hi,  &lt;BR /&gt;
&lt;BR /&gt;
&lt;B&gt;Base dataset&lt;/B&gt;&lt;BR /&gt;
&lt;BR /&gt;
month   a/cno     amount&lt;BR /&gt;
jan        1001        100&lt;BR /&gt;
jan        1001        200&lt;BR /&gt;
jan        1001        100&lt;BR /&gt;
jan        1001        100&lt;BR /&gt;
jan        1001        200&lt;BR /&gt;
jan        1001        500&lt;BR /&gt;
jan        1002        500&lt;BR /&gt;
jan        1002        500&lt;BR /&gt;
       &lt;BR /&gt;
&lt;BR /&gt;
&lt;B&gt;i require output dataset like this&lt;/B&gt;&lt;BR /&gt;
&lt;BR /&gt;
month   a/cno     amount  count&lt;BR /&gt;
jan        1001        100       1&lt;BR /&gt;
jan        1001        100       2&lt;BR /&gt;
jan        1001        100       3&lt;BR /&gt;
jan        1001        200       1&lt;BR /&gt;
jan        1001        200       2&lt;BR /&gt;
jan        1001        500       1&lt;BR /&gt;
jan        1002        500       1&lt;BR /&gt;
jan        1002        500       2&lt;BR /&gt;
&lt;BR /&gt;
Require count for repetitive amount...by month and a/c no&lt;BR /&gt;
provide me the code...

Message was edited by: NIKKI</description>
      <pubDate>Wed, 20 May 2009 09:30:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Count-of-repititve-amount-by-month-and-account-number/m-p/34242#M8319</guid>
      <dc:creator>LOK</dc:creator>
      <dc:date>2009-05-20T09:30:23Z</dc:date>
    </item>
    <item>
      <title>Re: Count of repititve amount by month and account number</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Count-of-repititve-amount-by-month-and-account-number/m-p/34243#M8320</link>
      <description>Hi Nikki,&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
plz try the following code.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
data sample;&lt;BR /&gt;
input month $ acno amount;&lt;BR /&gt;
datalines;&lt;BR /&gt;
jan 1001 100&lt;BR /&gt;
jan 1001 200&lt;BR /&gt;
jan 1001 100&lt;BR /&gt;
jan 1001 100&lt;BR /&gt;
jan 1001 200&lt;BR /&gt;
jan 1001 500&lt;BR /&gt;
jan 1002 500&lt;BR /&gt;
jan 1002 500&lt;BR /&gt;
;&lt;BR /&gt;
proc sort data=sample;&lt;BR /&gt;
by month acno amount;&lt;BR /&gt;
run;&lt;BR /&gt;
data sample1;&lt;BR /&gt;
set sample;&lt;BR /&gt;
retain cnt;&lt;BR /&gt;
by month acno amount;&lt;BR /&gt;
if first.amount then cnt=1;&lt;BR /&gt;
else cnt+1;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
Thanks&lt;BR /&gt;
Slone</description>
      <pubDate>Wed, 20 May 2009 10:49:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Count-of-repititve-amount-by-month-and-account-number/m-p/34243#M8320</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2009-05-20T10:49:11Z</dc:date>
    </item>
    <item>
      <title>Re: Count of repititve amount by month and account number</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Count-of-repititve-amount-by-month-and-account-number/m-p/34244#M8321</link>
      <description>Hi, Slone &lt;BR /&gt;
Thankyou!</description>
      <pubDate>Wed, 20 May 2009 11:15:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Count-of-repititve-amount-by-month-and-account-number/m-p/34244#M8321</guid>
      <dc:creator>LOK</dc:creator>
      <dc:date>2009-05-20T11:15:39Z</dc:date>
    </item>
  </channel>
</rss>

