My SAS version is 9.4 L1M5.
I can use function md5.
data null;
message = "The quick brown fox jumps over the lazy dog";
md5 = put(md5(message),$hex.);
put md5= ;
run;
md5=9E107D9D372BB6826BD81D3542A419D6
But I get error when I replace md5() by hashing().
data null;
message = "The quick brown fox jumps over the lazy dog";
md5 = put(hashing('md5',message),$hex.);
put md5= ;
run;
ERROR 68-185: The function HASHING is unknown, or cannot be accessed.
Somebody help!
The doc says : "This function is available beginning in SAS 9.4m6."
But I can see it in my help document, isn't it weird?
Perhaps, I never use the help document 🙂
Works for me under SAS9.4 with a recent enough maintenance release.
data null;
message = "The quick brown fox jumps over the lazy dog";
md5 = put(hashing('md5',message),$hex32.);
sas_version="&sysvlong.";
os="&SYSSCPL";
put md5= ;
run;
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.