Try 2 is the best method. Expand it like this:
filename tmp pipe '/opt/software/dbclients/CyberArk/cark_getpwd.ksh -a XXX -s XXX -o XXX 2>&1';
data want;
length return_string $2000;
infile tmp;
input return_string $;
put return_string=;
run;
The 2>&1 redirects stderr to stdout, so that all messages will appear in the SAS log.
But this:
/opt/software/dbclients/CyberArk/cark_getpwd.ksh[23]: /opt/CARKaim/sdk/clipasswordsdk not found
indicates that there is a problem locating a library or module needed for the command to work. Look at line 23 of the shell script.
Make sure that your direct and SAS attempt to run the command are executed in the same environment:
same server
same user
same settings in environment variables (e.g. PATH, LIBPATH)
... View more