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
please help....
at least in SQL...!!
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;
Thanks a lot...
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.