In order to test if the RND function returns unique values when called in Jobs executing simultaneously, I created a routine with Just the 2 lines:
Code: Select all
RANDOMIZE (@NULL)
Ans=RND(99999)
A sequence calls all 5 invocations in parallel.
(and yes i had some time on my hands to try this out)
The results are documented in the above link.
The reason for this post is the strange thing I'd noticed when testing the routine I'd built for this test was that if I used randomize(@NULL) in the routine, it generates the same value across 5 different test rows(Dummy arguments and using "Run All"). If I rem'med the randomize() function, it would return unique random numbers. This is the exact opposite of what i noticed when using this routine in the 5 instanced Job
The question this raises is that how does the Manager do the Test for routines?
Does each routine call spawn a new process (i feel this is unlikely)
or
One sIngle process runs all the test rows one after the other? If so, after a test run, is this process killed and an new one started for each test run?
Any other details (pages in manuals, links to docs, etc) would be very very velcome