DATA Step, Macro, Functions and more

SAS SERVERPASS

Reply
New Contributor
Posts: 3

SAS SERVERPASS

I am attempting to use a macro to add my password information to my proc export code so I don't have to re-enter password in each line of script when password changes. The example below displays my attempt. Is there anything missing from the code or do I need to take another avenue?

 

proc export data= TEST.test_import

outfile= "\\A\B\C\D\E.xls"

dbms= EXCELCS replace;

SHEET = "TEST";

SERVER ='XXXXXXXX;

SERVERUSER = 'XXXXXX’;

SERVERPASS = &password;

 

Any help is appreciated.

Super User
Posts: 3,254

Re: SAS SERVERPASS

Posted in reply to Dataanalyst313

Try adding double quotes here: serverpass = "&password";

 

I'm assuming that your &password is defined without quotes like so: %let password = MyPassword;

Ask a Question
Discussion stats
  • 1 reply
  • 139 views
  • 0 likes
  • 2 in conversation