Hi All, Ok, seeing I get to visit this question on a regular basis with the National Guard... They do a "percentage based random drug test" every so many months. It seems to be based on the last digit of the SSN...If they want 70% they just pick seven of the 10 digits 0,1,2,3,4,5,6,7,8,9 and everyone who's SSN ends in that number gets to be tested! Oh Joy of Joys hehehe :) I think Steve is right about just using the RAND() function.... tho I think that it can produce "reproducable and therefore predictable" results ?? Art "been a while since I had to write a random number generator" Bahrs >>> Steve Dirickson b894 WestWin <[log in to unmask]> 10/21/97 11:35am >>> <<The original posting should probably have said that the selections "could" change from year to year, as it is theoretically possible to randomly select the same employees every year. This is OK although we need to make sure that the same employee is not selected more than once in the same year. I also have been told that there may be COBOL INTRINSICS that could be used for this. Is this a possible solution?>> Again, a truly random selection not only allows a given entry to be selected twice in a row, but must allow every entry to have the same selection probability every time the process is run. This means, for example, that a given employee could be selected five times in a row. Selecting one employee each time from a list of ten gives odds of 100,000:1 against the five-in-a-row sequence. However, if the probability is artificially forced to be zero, the system is not random. In fact, it is explicitly non-random, and using it for something like drug-testing selection would likely be the basis of a successful court challenge. As for the method, I'm not a COBOL programmer, but every other language I've used (C, FORTRAN, BASIC) had a function that returned a pseudo-random sequence. There's also the 'RAND()' intrinsic in XL.PUB.SYS (I think that's where it lives); it's documented in the "Compiler Library/XL" manual (which is packed away at the moment-we're getting ready to change buildings-so I can't give you a page reference). Steve