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;
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
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.
Ready to level-up your skills? Choose your own adventure.