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.

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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