× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



What isn't clear to me is what it is that he is doing. He seems to want a listing of every number from 1 to the number of records in the file, but in random order. It seems like a redundant exercise? Which makes me suspect that something is missing from the specification he gave us.

Doesn't Rexx have a pretty good Random number Generator, with parms?

"number = RANDOM(lowerLimit, upperLimit, seed)

Args

lowerLimit is the desired minimum value for the returned random number. If omitted, it defaults to 0. If upperLimit is omitted, but lowerLimit is specified, then lowerLimit actually functions as if it is upperLimit.

upperLimit is the desired maximum value for the returned random number. If both lowerLimit and upperLimit are omitted, then they default to 0 and 999, respectively.

seed is any number that you would like to reseed the random number generator with. If omitted, no reseeding is performed."

http://tinyurl.com/2y8fop*
*

*
*



Adam Glauser wrote:
Mark Villa wrote:
What do you need the random number to do?
pick a record in a table, if the random number is < 1 or > the number
of records in the file, get another number and repeat until done.
Simple stuff, have seen it done many times but never needed to write
the generator interface - and is one of those things you usually just
don't ask too many questions about over the years.

Off the top of my head, but one thing to consider might be the distribution of record numbers if you are using RRN. For example, in an old file with deleted records, the lower random numbers are less likely to correspond to a non-deleted record than the higher RRNs.


The record is the winner of a real estate drawing, for example.
I am not too concerned about scrutiny as long as I apply the industry
standard rather than dream up a methodology that no one knows how it
is derived. The backdrop of my position on this topic might be
summarized in a a term we commonly see, security by obscurity. I think
obscurity is not a good idea for obtaining a random number.

I wholeheartedly agree. Using a well-known, cryptographically sound pseudo-random number generator should be sufficient for most cases, I should think. I suspect that the crypto APIs would do the trick.

There's another DIY hardware device not mentioned specifically in the wikipedia article. It doesn't necessarily fit the "well-vetted" requirement, but may be of interest nonetheless: http://www.lavarnd.org/what/index.html


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.