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 *