Ranuni returns a random number from the uniform distribution between 0 and 1. So it looks like here, the phrase ceil(ranuni(1832577)*2) will return 0 when the random number generated is 0, 1 when the random number generated is greater than 0 and less than or equal to .5, and 2 when the random number generated is greater than .5 and less than or equal to 1. The seed is specified here just to give a reproducible result. If you do not specify a seed, the results will change each time the code is run. The seed can be any number less than 2^31-1, including a date or time value as those are stored as numeric values in SAS.
... View more