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
>
|