I can able to retrieve password from using below command from unix . I am trying to achieve the same using SAS
/* Try 1*/
systask command '/opt/software/dbclients/CyberArk/cark_getpwd.ksh -a XXX -s XXX -o XXX'
status=passwd;
%put &passwd. &sysrc.;
result :
&passwd. blank &sysrc. is 0
/* Try 2 */
filename tmp pipe '/opt/software/dbclients/CyberArk/cark_getpwd.ksh -a XXX -s XXX -o XXX';
data want;
length return_string $2000;
infile tmp;
input return_string $;
put return_string=;
run;
result : return_string=/opt/software/dbclients/CyberArk/cark_getpwd.ksh[23]: /opt/CARKaim/sdk/clipasswordsdk not found
/* try 3*/
%macro pwdls;
%sysexec %str(/opt/software/dbclients/CyberArk/cark_getpwd.ksh -a XXX -s XXX -o XXX);
%mend pwdls;
%pwdls;
/* try 4*/
%let a=%sysexec %str(/opt/software/dbclients/CyberArk/cark_getpwd.ksh -a XXX -s XXX -o XXX);
%put &a.;
result: ERROR: Macro keyword SYSEXEC appears as text.