HP3000-L Archives

December 2006, Week 2

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
okappert <[log in to unmask]>
Reply To:
Date:
Tue, 12 Dec 2006 22:11:08 -0500
Content-Type:
text/plain
Parts/Attachments:
text/plain (39 lines)
Brian:

Try adding the milliseconds into the equation.  Or maybe call the random 
number generator from one of the other languages.

Olav.

Brian Donaldson 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 *
>
>
>  
>

* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

ATOM RSS1 RSS2