BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
breadmaker
Fluorite | Level 6

Hi guys,

 

I want to create a Unique Identifier using hash for multiple columns. (I am not sure if I am using the correct terminology)

 

breadmaker_0-1587396444366.png

Taking the baseball data set as an example:

I want to hash the personal identifiable information ('Name' column), and still show other columns ('nAtBat', 'nHits') when one queries. 

 

I just started the task and have the following code:

breadmaker_1-1587397214516.png

 

I want to know how to hash the 'name' column. 

 

Could you guys please tell me any method I can use or any resources I can look into?

 

Thanks in advance!

1 ACCEPTED SOLUTION

Accepted Solutions
SASKiwi
PROC Star

@breadmaker - Try the example in the link I sent you:

data _null_;
   y=md5('abc');
   z=md5('access method');
   put y=/ y=$hex32.;
   put z=/ z=$hex32.;
run;

View solution in original post

4 REPLIES 4
breadmaker
Fluorite | Level 6

Hi,

 

When I tried to implement hashing, I got the error of "HASHING is unknown".

Here is my code:

 

DATA HASH_BASEBALL;
    SET SASHELP.BASEBALL;
    MD5 = HASHING('MD5', Name);
RUN;
 
Here is the error:
 
68
ERROR 68-185: The function HASHING is unknown, or cannot be accessed.
 
Do you happen to know the reason for this error?
SASKiwi
PROC Star

@breadmaker - Try the example in the link I sent you:

data _null_;
   y=md5('abc');
   z=md5('access method');
   put y=/ y=$hex32.;
   put z=/ z=$hex32.;
run;
breadmaker
Fluorite | Level 6
Thanks!
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
  • 4 replies
  • 2125 views
  • 3 likes
  • 2 in conversation