Help using Base SAS procedures

how to find rows with such conditions

Reply
New Contributor
Posts: 2

how to find rows with such conditions

hi all, policy amount date 1 50 1 1 20 3 1 30 7 1 60 9 2 120 12 2 80 14 2 100 18 i want to find the dates on which policy are paying their premium. for ex if the premium amount for policy 1 is 80 so on 7th date his first premium is fully collected plus 20 rs extra.on 9th date his second premium is fully recieved..20 remaining and he paid 60rs..so i want only rows where he finally paid premium..like for policy 1 i want only 3rd and 4th row.i have 1 cr policies. please help on this

Valued Guide
Posts: 860

Re: how to find rows with such conditions

Posted in reply to rajan_reliance

I think what you want to do is use the sum statement but your question isn't very clear.  If this doesn't give you the desired out put try attaching what it is you are looking for:

data have;

infile cards dsd;

input policy$ amount date;

cards;

1,50,1

1,20,3

1,30,7

1,60,9

2,120,12

2,80,14

2,100,18

;

data want;

set have;

sum_pay + amount;

run;

Ask a Question
Discussion stats
  • 1 reply
  • 220 views
  • 0 likes
  • 2 in conversation