odUsers would like to know if they can run SDD API code from Windows SAS without displaying user password in the log. In order to run the SDD code from Windows SAS follow the below steps Go to site ftp://ftp.sas.com/techsup/download/hotfix/35drugdev.html and download the latest Remote API release Refer to the ftp://ftp.sas.com/techsup/download/hotfix/drugdev/35drgrmtapi03/RemoteAPI.pdf and chapter 2 for installation instruction. Once the API is installed properly to execute SDD API code from Windows SAS, the major challenge is that first step is call to %sasdrugdev_login macro which requires userid and password values as parameters. In order to make sure user password is not displayed in the log use the below code. options mprint symbolgen mlogic; %macro sddlogin; *******************************************************; * Make sure no macro resolution take place *; *******************************************************; %let _mprint =%sysfunc(getoption(mprint)); %let _symbolgen = %sysfunc(getoption(symbolgen)); %let _mlogic=%sysfunc(getoption(mlogic)); options nomprint nosymbolgen nomlogic; *******************************************************; * Specify the SDD instance URL and capture userid, *; * password using the window screen *; *******************************************************; %let sddurl=%str(https://XXXXXX.sas.com/sddremote); * --> UPDATE THIS LINE TO YOUR SDD INSTANCE URL; * Initialize macro variables as local and clear them; %local username password; %let username=; %let password=; %window pw columns=55 rows=15 icolumn=5 irow=25 #4 @15 'SDD Authentication' attr=highlight #6 @15 'Username:' #6 @25 username 15 required=yes attr=underline #8 @15 'Password:' #8 @25 password 15 display=no required=yes attr=underline ; %display pw; %sasdrugdev_login(url=&sddurl, sdduserid=%superq(username), sddpassword=%superq(password)); %mend sddlogin; %sddlogin; ********************************************************; * Reset the macro resolution options to original value *; ********************************************************; options &_mprint &_symbolgen &_mlogic; %sasdrugdev_getobjects(sddpath=/SDD,dsname=work.getobjects,recursiveLevel=1); proc print data=work.getobjects width=min; run; %sasdrugdev_logout; Above code encapsulates the %sasdrugdev_login into another macro %sddlogin which uses the concept of %window and %display. Combination of these two statements provide user interface where user can enter authentication information and suppressing mlogic mprint and symbolgen options make sure that the value of these macro variables are not resolved during execution. Using above technique generic and dynamic code can be developed which can be run without every worrying about displaying user authentication information in the log. This is how we recommend. Do you use this same approach or a different one?
... View more