Thank you all who replied and I updated the macro and it works. But inspite I have secured library folder crated using SMC, and there are no errors/warnings during compliation and execution of the macro, the data set creted is not enrypted --as reported by proc contents. Here is the code again.
%macro encryptsas(libpath=,metalib=,metafolder=);
proc authlib lib=&libpath.;
create securedlibrary="&metalib."
securedfolder="&metafolder."
pw=test123
require_encryption=yes
encrypt=AES
encryptkey=testkeyvalue123;
run;
%mend encryptsas;
libname tmp "/var/usersdata/risk/prj/users/awais/projects/hello";
%encryptsas (libpath=tmp, metalib=secured, metafolder=awais);
data tmp.test25;
set sashelp.air;
run;
proc contents data=tmp.test25;
run;
... View more