In the SAS learning course Programming 2, the rand function was used with “Integer” for random values to the data but when I tried it using my SAS 9.4 TS level 1M3 on Microsoft windows 10 enterprise(x64), I couldn’t get the same result. I also looked online to see compatible distribution for the Rand function but non specify the “integer”. This is my data step;
data test.class1;
NameID=Rand("Integer", 100,999);
set test.Class;
drop name sex;
run;
I have also tried the (RandBetween), but didn’t work. Any help ?
@Reeza Thank you, it worked.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.