Let me just ask a philosophical question. If you have a range of numbers, say 1 to 100, and want to assign random numbers in that range and never repeat, how would that be any different from just assigning from 1 to 100?
It's conceivable that a random number generator could return random numbers in order from 1 to 100 anyway. By keeping track of random numbers between 1 and 100, and eliminating repeats, you eventually will assign values from 1 to 100.
Whatever you're doing makes ZERO logical sense. Mathematically it works out the same as assigning from 1 to 100 as randomly assigning between 1 and 100. If you simply want a "scrambled" row order when finished, then simply re-partition to "randomize" the row order.
You're making something harder than it should be.
Kenneth Bland
Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
Write a sequence of numbers as keys to a hashed file (UniVerse table) on the conductor node, then read it back. The hashing algorithm will give you some measure of scrambling, and your generated sequence will be unique.
You could use an External Target stage or a server job shared container containing a Hashed File stage to write to the hashed file, and an External Source stage or a server job shared container containing a Hashed File stage to read from the hashed file.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.