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 (April 1997, week 5)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Tue, 29 Apr 1997 17:02:50 -0400
Reply-To:     "Rickards, Clinton S" <RickardsCS@AETNA.COM>
Sender:       "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From:         "Rickards, Clinton S" <RickardsCS@AETNA.COM>
Subject:      FW: Seeds

Javier, actually, RANUNI is a CALL function, so it would be coded like this:

call ranuni(seed, var);

where seed is an integer and var is the variable to receive the generated number. If seed is less than or equal to 0 then SAS uses the system clock as the seed. Clint Clint Rickards, ARS IT, TNB2 Phone: 860-273-3420

>---------- >From: jportela@eucmax.sim.ucm.es[SMTP:jportela@eucmax.sim.ucm.es] >Sent: Mon, Apr 21, 1997 6:58 am >To: SAS-L@VTVM1.CC.VT.EDU >Subject: Seeds > >Hi, > >Suppose I want to generate a random var., for example: > >data one; >do i=1 to 10; > x=ranuni(13424); > output; >end; >run; > >But I want to re-run the program (not automatically, just manually with >Submit) >getting each time differents sets of values for x. > >In the example: > >The seed is the same----->I get same values for x. > >If I put "i" as seed, it creates also the same values each time. > > >How can I do it? I don't know if SAS has a function wich takes the value of >the >computer-clock time. I could use it always as seed (it would change each >second, >or each milisecond) > > >Thank you, > >Javier >


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