How to generate random number in DataStage
Very simple procedure to generate random number in DataStage. Grab a transformer on your canvas and use following code:
1 |
Mod(Rand(),MAXNUMBER) |
This code will return you a pseudorandom number in the range from zero to (MAXNUMBER – 1). So for example Mod(Rand(),500) will return number from 0 to 499.