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 06:51:30 -0000
Reply-To:   sanrou <jindan@GMAIL.COM>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   sanrou <jindan@GMAIL.COM>
Subject:   Newbie question on macro coding (DO LOOP)
Comments:   To:
Content-Type:   text/plain; charset="iso-8859-1"

I am very new to SAS macro language (and even SAS programming), I've spent the last couple of hours on the following problem:

I need to develop a simple macro to apply PHREG procedure on hundreds of simulated data. The dataset is manipulated by three parameters: U: Sample size, 60, 120, 180 P_c: Probability, 0.0, 0.4, 0.6, 0.8, 1.0 delta: 0.5, 0.8, 1.0, 1.2, 1.5, 1.8, 2.0

Each of the parameter combination are run on three seed numbers: 539, 259, 59.

I figured out the DO LOOP iteration for the variable Sample size as:

DO I = 60 to 180 by 60; code for PHREG...; END;

But I simply couldn't figure out how to do the iteration for the rest of the variables, as they do not have a particular pattern. I spent some time on DO ... WHILE ...; ARRAY, etc., but still have no clue.

Can someone give me a quick hint on how to code iteration on variables such as P_c, delta, and seed numbers as above?

Thanks so much!


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