OMG, why in the world do you need a field that
will store the distance from us to the Andromeda
galaxy in inches? Just call CLOCK as a seed
value, it goes down to a tenth of a second, which
might do it, I always used this in a loop to
create random file names until flabelinfo didn't
fail on the file name. I seem to remember some
random seed generator, but I can't remember the
language or platform now, but I thought it was back on a series III
At 05:35 PM 12/12/2006, you wrote:
>
>I’m using the combination of the system date
>(X8) and time (X8) as the seed
>for the Cobol function RANDOM (e.g. 2006121309215430 may be the date/time
>combo seed). Works fine the first time it is
>executed. The result being moved
>into a PIC S9(18) COMP field.
>The problem is that the next time around executing this routine the
>date/time combo may not have advanced any,
>therefore giving me the same “random”
>number.
>I thought the date/time combo might be unique but obviously not. Then I
>thought by pausing the program for one second before getting the system
>date/time again might help things along.
>The problem with that -- the run time of the program is significantly
>increased.
>Has anyone any idea on how to pass a (more) unique seed number to the random
>function?
>Any and all suggestions will be greatly appreciated.
>TIA,
>Brian Donaldson.
>
>
>* To join/leave the list, search archives, change list settings, *
>* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
Regards,
Shawn Gordon
President
theKompany.com
www.thekompany.com
www.mindawn.com
949-713-3276
* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
|