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.

HTH

Peter

-----Original Message-----
From: IBM Mainframe Assembler List [mailto:[email protected]] On 
Behalf Of Richard Kuebbing
Sent: Tuesday, May 16, 2017 4:28 PM
To: [email protected]
Subject: random quest

So I need a set of 99,999 random numbers which are 5 digits and unique, i.e. no 
duplicates.  CEERAN0 and Cobol FUNCTION RANDOM both give sets w/30+% duplicates.

I have seen website random.org.

Anyone have to ever done this thing?

Anyone have suggestions?

--

This message and any attachments are intended only for the use of the addressee 
and may contain information that is privileged and confidential. If the reader 
of the message is not the intended recipient or an authorized representative of 
the intended recipient, you are hereby notified that any dissemination of this 
communication is strictly prohibited. If you have received this communication 
in error, please notify us immediately by e-mail and delete the message and any 
attachments from your system.

Reply via email to