John M wrote (snipped):
A full billion, 5 byte, packed numbers would require 5 billion bytes of storage (5 Gb), or about 2^23 bytes. If you wanted to, you could run a program and save this in a VSAM Linear dataset. You could then use this dataset as your permanent map and access it as a DIV (Data In Virtual) file, using very efficient memory mapping. Or create it as an ESDS and access it in RBA mode. Or perhaps even an VSAM RRDS. Generating the file may take a while, especially to guarantee the uniqueness of the random map. The biggest problem might be finding a random number generator which can actually generate uniformly random values in the range [0..5,000,000,000]. Do it over a weekend. Or in a low priority batch job. The dataset should fit on 3 volumes of 3390-3 space.
Unfortunately, I believe DIV is limited to 2G.
You only need (want) 1 billion random numbers. I think multiplying each 9 digit number by a prime greater than 1 billion and dividing by 1 billion will generate a unique 9 digit remainder for each number. John R wrote (snipped):
Another idea could be to have two indexes: one for the first five digits, and the other for the last four. If you break it up like this, the combined result is still unique, deterministic, and impossible to reverse engineer unless you have access to the translation index.
What if you broke it up into 9 indexes, one for each digit; wouldn't that fit the same criteria? Gary Weinhold Data Kinetics, Ltd. ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN

