BookmarkSubscribeRSS Feed
allurai0412
Fluorite | Level 6

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

3 REPLIES 3
allurai0412
Fluorite | Level 6

please help....

at least in SQL...!!

sam369
Obsidian | Level 7

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;

allurai0412
Fluorite | Level 6

Thanks a lot...

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

What is Bayesian Analysis?

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 737 views
  • 3 likes
  • 2 in conversation