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.

hackathon24-white-horiz.png

The 2025 SAS Hackathon Kicks Off on June 11!

Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.

YouTube LinkedIn

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
  • 813 views
  • 0 likes
  • 2 in conversation