BookmarkSubscribeRSS Feed
ZahidHussain
Calcite | Level 5

Hi Folks,

 

I want to generate random seed number for subject id such as

subject id           seed

12345678          21258793

47582236          32569874

 

My subject id is 8. . Each seed would be 8. and random seed would be fixed for each subject id. How to write that code?

 

Thanks

zahid

3 REPLIES 3
ZahidHussain
Calcite | Level 5

Thanks for your reply. Does every time generation those random number would be  same?

 

 

Reeza
Super User
If the seed and data is exactly the same, ie order then yes. But if you're asking if you pass in 12345678 will you always get the same value out, the answer is No. Any solution that does that is considered reversible essentially as soon as you have a few mapped and unmapped IDs.

sas-innovate-wordmark-2025-midnight.png

Register Today!

Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.


Register now!

How to Concatenate Values

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 3 replies
  • 633 views
  • 0 likes
  • 2 in conversation