The real issue of pwencode is that the source code you can still copy/paste that and it will work. By that everyone is able to used that once having copied it. Using pwencode will solve just the incidental seeing as dificult to remember. It will be reversed by SAS to its original value before sending out. As SAS is able to do that someone else could do that also. What can be done is a dynamic part in the SAS source solving it at the moment when needed. Where must your key-password come from? My suggestion would be a password encrypted file belonging to the data/key running the needed process. Sounds posssible complex but can be solved with a SAS macro. Need a sample? Watch the read-key value needing to be the same. Sample to create SAS dataset Data lib.keypswd (read=P1jkU7r write=secret-me alter=secret-me) ; length id $ 16 keypsw $ 32 ; id="orion" ; keypsw="test app" ; output; id="PMIB" ; keypsw='user="P_RSI_CI" pw="Z75AftgTb"' ;output; run; Sample SAS macro: /* * * xkeypswd * * * */ /* * * read personal key-pswd to acess external dbms * * * */ /* * * written by:jakarman * * * */ /* * * designed 2007 (8.2) converted 2012 (9.-) * * * */ %macro xkeypsw (mainarg,opt,readvl=P1jkU7r,keypswfl=lib.keypswd) ; %local larg lind xkeypswdret ; %let opt =%lowcase(&opt) ; %let larg=%length(&mainarg) ; %let lopt=%length(&opt) ; %let xkeypswdret=; %if ( %index(&opt,HELP) >0 | %index(&opt,?) >0 | %index(&mainarg,?) >0 ) %THEN %do ; %* (insert your comment as copied this sample source) ; %let xkeypswdret=help text given ; %end ; %if ( %length(&xkeypswdret) = 0) %then %do ; %let keydsid=%sysfunc(open(&keypswfl ( read=&readvl where=( id = "&mainarg") ) ,i )); %if (&keydsid = 0) %then %put %sysfunc(sysmsg()); %else %do ; %let rc=%sysfunc(fetch(&keydsid )); %if ( &rc ne 0) %then %put %sysfunc(sysmsg()) ; %let pw=%sysfunc(getvarc(&keydsid,%sysfunc(varnum(&keydsid,keypsw)))) ; &pw %end ; %if ( &keydsid > 0 ) %then %let rc=%sysfunc(close(&keydsid)) ; %end; %mend ;
... View more