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 (August 2007, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Tue, 28 Aug 2007 00:15:00 -0700
Reply-To:     Tree Frog <tree.frog2@HOTMAIL.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Tree Frog <tree.frog2@HOTMAIL.COM>
Organization: http://groups.google.com
Subject:      Re: Newbie question on macro coding (DO LOOP)
Comments: To: sas-l@uga.edu
In-Reply-To:  <1188283890.558322.68990@w3g2000hsg.googlegroups.com>
Content-Type: text/plain; charset="us-ascii"

Hello

I can't comment on the validity of the approach you're taking here (I don't even know what "PHREG" is) - someone else will do that - but here's some code that will do what you're looking to do. If you run this as is, you'll see in the log all the combinations of your variables, each of which will correspond to a single call to the phreg routine. Good luck making sense of the results!

Tree Frog.

%macro myphregmacro(sample=,p_c=,delta=,seed=); %*<your phreg code here, using '&sample' '&p_c' '&delta' and '&seed' in place of values>; %put &sample &delta &p_c &seed; %mend;

data _null_; array mysamplesize(3) (60 120 180); array myp_c(5) (0.0 0.4 0.6 0.8 1.0); array mydelta(7) (0.5 0.8 1.0 1.2 1.5 1.8 2.0); array myseed(3) (539 259 59); do s=1 to dim(mysamplesize); do p=1 to dim(myp_c); do d=1 to dim(mydelta); do se=1 to dim(myseed); call execute('%MYPHREGMACRO(sample='|| mysamplesize(s)||',p_c='||myp_c(p)||',delta='||mydelta(d)||',seed='|| myseed(se)||')'); end; end; end; end; run;


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