I have finally been stumped and need some advice.
I have the exact same issue as this post: viewtopic.php?t=128945
Basically I created a server routine to for some random values using the rnd() function. Now this functions works as intended when I test the routine itself. But when I place it into a transformer in a server job, I get the same values every run. And I am not specifying a seed value, specifically because it was my understanding you did not need to. And I thought maybe since I didn't specify one, that datastage is assuming one or something.... But doesn't make sense to me why I can test the routine and get random values.
The IBM knowledge article specifically says to use the rnd() function if you want to generate an unrepeatable random number sequence. Which I do!!!!
But every time I run the server job, the value 8523 becomes 6007.
And did not see a proper solution in the previous post. I understand that we can "seed" the rnd() function. But that is not the solution we need. Because it is my understanding, that if we seed the rnd() function, the values are going too all be the same in that run essentially.
And when I did implement a seed, it works that each run produces different values, but all the values in the single run are converted the same.
Like so:
Code: Select all
8 -> 7
85 -> 70
856 -> 701
8569 -> 7015
Also this does not HAVE to be a server job. I just had assumed it would be easiest to implement the code into a routine. But sadly although the code works when testing the routine, it doesn't work as intended at run-time. And it could also be reusable if in the future we require other data masking requirements.
My next option is to try and implement this code into a looping variable or something in a parallel job. But would like to at least figure out the "why" behind this issue in the server job.
Any feedback or advice is greatly appreciated.
Thanks,
Taylor