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.
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
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.
Ready to level-up your skills? Choose your own adventure.