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-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

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!

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