I have already used this piece of code to get the password for one of DB id. But I cannot define the output of the below %sysexec to a variable so that I can used the same in later part of my sas code.
%macro pwdls;
%sysexec %str(/opt/CARKaim/sdk/clipasswordsdk GetPassword -p AppDescs.AppID=DIAL -p Query="safe=chbs_test;Folder=Root;Object=Test-XXXXXXX-XXX-XXX" -p FailRequestOnPasswordChange=false -o Password);
%mend pwdls;
As soon as I call the macro I am getting the as below:
%pwdls;
TDFR6_67fuuwr91
But I want this output to be captured inside a variable. How can I do that.
I tried using the below piece but I am getting error as below:
42? %macro pwdls;
43? %let a=%sysexec %str(/opt/CARKaim/sdk/clipasswordsdk GetPassword -p AppDescs.AppID=DIAL -p Query="safe=chbs_test;Folder=Root;Object=Test-XXXX-XXX-XXX" -p FailRequestOnPasswordChange=false -o Password);
ERROR: Macro keyword SYSEXEC appears as text.
ERROR: A dummy macro will be compiled.
Please help