HI, Firstly apologies if this is the wrong place to post...first time I've used this! Thank you for posting the code above - it's really helped me. I'm trying to SHA1 encode entries in a file, but I can't find a way of incorporating the code into a macro and thus can only do one at a time using the code you provided below. proc sql noprint; select mskey, emailcode into :mskey, :emailcode from trust; quit; %let toHash=&mskey&emailcode; proc groovy; submit "&toHash."; import java.security.MessageDigest exports.sha1 = new BigInteger(1, MessageDigest.getInstance("SHA1").digest(args[0].getBytes())).toString(16) endsubmit; quit; %put &toHash; %put &sha1.; When I try and incorporate in a macro it mentions that the submit block cannot be directly placed in a macro. Instead, place the submit block into a file first and then use %include to include the file within a macro definition. Sorry, my coding is not good enough to make this work Any help would be much appreciated!
... View more