Help using Base SAS procedures

caculating 'exit load' based on dates !!!

Reply
Frequent Contributor
Posts: 97

caculating 'exit load' based on dates !!!

hi ,

i have some query  how to generate the required output in PROC REPORT

please help...

data have1;
infile datalines;
input trdatedate9. trtype$ BROKER$8. FOLIONO  tramount
datalines;
24/02/2008 SWITCH   ARN-0010  4278998 5000.00
01/01/2008 PURCHASE ARN-0022  4897722 7875.56
01/03/2009 PURCHASE ARN-0010  4222111 4500.00
02/04/2009 PURCHASE 000-000   4555689 7899.00
12/04/2007 SWITCH   ARN-0012  4121212 4555.00
12/04/2007 SWITCH   0000-0000 4787878 45651.00
01/08/2011 PURCHASE ARN-23587 4787872 12780.00
25/01/2012 SWITCH   ARN-0018  4878123 10000.00
24/10/2010 PURCHASE ARN-0025  4666667 7800000.00

;
RUN;

************************************************************************************output required*************************

I NEED THE OUTPUT THRU PROC REPORT

LIKE  FOLLWING

FOLIONO  EXITLOAD
4278998  ....
4897722  ...
4222111  ...
4555689  NIL
4121212  ...
4787878  NIL
4787872  ...
4878123  ...
4666667  ...

CONDITIONS TO BE MATCHED :

* customers with BROKER CODE ....000-000 at any trdate , they will have "NO LOAD"

* THOSE WHO HAS GOT IN TO THE FUND..... 3 YEARS AGO WILL have " NO LOAD"

   i.e earlier 16/01/2010

* Those who has got in to the fund after 17/01/2010 will have  exit load "2%" of tramount.


reagards

ALLU

Frequent Contributor
Posts: 97

Re: caculating 'exit load' based on dates !!!

Posted in reply to allurai0412

please help....

at least in SQL...!!

Regular Contributor
Posts: 168

Re: caculating 'exit load' based on dates !!!

Posted in reply to allurai0412

Hi Allu,

You could try this

proc sql;

create table test as

select *,case

             when index(substr(broker,1,3),'000')>0 then 'NO LOAD'

                   when trdate le (intnx('year', today(), -3, 's')) then 'NO LOAD'

                   else strip(put(0.02*tramount,best.))

                   end as EXITLOAD

from have1;

select FOLIONO,EXITLOAD

from test;

quit;

Frequent Contributor
Posts: 97

Re: caculating 'exit load' based on dates !!!

Thanks a lot...

Ask a Question
Discussion stats
  • 3 replies
  • 192 views
  • 3 likes
  • 2 in conversation