In reply to jeeva.

Yes. As I say in my book Simulating Data with SAS, "The Rayleigh distribution is a special case of the Weibull distribution. A Rayleigh random variable with scale parameter sigma is the same as a Weibull random variable with shape parameter 2 and scale parameter sqrt{2}*sigma." (Wicklin, 2013, p113). Therefore, the following statement generates a random variate from the Rayleigh distribution:

/* Rayleigh(threshold=theta, scale=sigma) */
X = theta + rand("Weibull", 2, sqrt(2)*sigma);

If you need more help, post your question to the SAS/IML Support Comunity