Creating a random Select List (AREV Specific)
At 23 JUL 1998 08:48:45AM Mark Ford wrote:
I use "select 20 myfile" to create a select list of 10 records. This works fine but the command always selects the same 10 records. Is there a way to select "N" number of reccords such that the IDS are a true random selection. I use the option for selecting client recods to be auditted..
Any assistance will be very much appreciated.
Thanks, Mark
At 23 JUL 1998 09:31AM Aaron Kaplan wrote:
Select X File will always return the first X records that match the criteria.
There are a few ways you could do this. One is to generate a random number N, and run through the file taking every Nth key until you have the number of records you want.
Another way is to have a symbolic @ANS=RND( n ) and then search for
WHERE SYMFIELD=X
so you'll have a differing generating X in each select and each record will always return a different value.
At 24 JUL 1998 09:55AM Mark Ford wrote:
Aaron,
Thanks for the reply and suggestions. Thaay are a great help and very much appreciated.
Mark