On 2017-05-16, at 14:50, Farley, Peter x23353 wrote: > 1. Use either CEERAN0 or FUNCTION RANDOM to generate a column of 99,999 > random numbers. It's OK if there are duplicates. > 2. Add a second column using SORT with sequential numbers from 1 to 99999 > (use the SEQNUM option). > 3. SORT by the first column only and DO NOT specify the EQUALS option. > 4. Use the numbers in column 2 after sorting as your 99,999 randomly > ordered numbers > > You can combine steps 2, 3, and 4 in one SORT execution. INREC to add the > SEQNUM's as a second column, SORT by first column, OUTREC to select only the > second column for output. > Are you sure that duplicates in the first column don't matter? Consider the wildly unlikely case in which every number selected in the first column is 42. What is the order in column 2 after the sort?
Well, the statement of the problem didn't require that all permutations be equally likely, so I guess it might not matter. -- gil
