LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (October 2007, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Thu, 25 Oct 2007 09:51:29 -0700
Reply-To:     ram <prsana@GMAIL.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         ram <prsana@GMAIL.COM>
Organization: http://groups.google.com
Subject:      Macros
Comments: To: sas-l@uga.edu
Content-Type: text/plain; charset="iso-8859-1"

I have the following code that is giving me issues:

%macro get_data; data gains; alpha = 15-param3 ; beta = 1/(alpha*(1+alpha)); do i = 1 to 1000000; totalgain = 1000000; do while (totalgain > min_gain); totalgain = exp(param1 + rannor(10)*params2*params3); end; output; end; run;

proc univariate data=simloss NOPRINT; var totalgain; output out=percent pctlpts=90 99 99.9 99.99 pctlpre=P_; run;

data fake; set percent; call symput('cutoff90',P_90); call symput('cutoff99',P_99); call symput('cutoff999',P_99_9); call symput('cutoff9999',P_99_99); run; proc print data=fake; run; %mend gat_data;

data simulated; set parameters; select; when (frequency >= 10 and trim(dist) = 'GAMMA') do; %get_data; cutoff = &cutoff90; end; otherwise; end; run;

Is there anything wrong with invoking the %get_data macro within the data step ? In my logs I find that this piece of code does not get executed. Can someone tell me how I can re-write this code ?

Thanks Ram


Back to: Top of message | Previous page | Main SAS-L page