DATA Step, Macro, Functions and more

Creating a random GUID for every Row in a dataset

Reply
Occasional Contributor
Posts: 11

Creating a random GUID for every Row in a dataset

I want to create a random 32 digit number containing both characters and numbers like 4b212e34-056f-413a-8dd8-d04e9b4c7756.

How can I do this in SAS?

 

Thanks in advance.

Occasional Contributor
Posts: 11

Re: Creating a random GUID for every Row in a dataset

Hi,

 

I actually looked it up online and found a function that finds GUIDs.


data wastedGuids;
do x=1 to 10;
guid = uuidgen();
output;
end;
run;

 

Thanks.

Ask a Question
Discussion stats
  • 1 reply
  • 137 views
  • 2 likes
  • 1 in conversation