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.
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
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.