Hi All,
I am trying to connect with database using libname statement, for that I have created a macro variables and those variables is not fetched in libname statement. Can you all please look into the code and help me resolve the issue.
See difference in below two libname statements in a password field.
code:
%let user=%str(rakesbx);
%let password=%str(rAk%B25%);
/*Libname cdl1 odbc datasrc="cdl2-hive" schema= abv_hcp360_besting_lease_ext user= "&user" password= "rAk%B25%";*/ ---> when I am trying these way and commenting the password variable it is giving the result i.e.,:
Success result is:
Libname cdl2 odbc datasrc="cdl2-hive" schema= abv_hcp360_opt_preference_ext user= "&user" password= "&password"; ----> when I am trying these way it is not giving the result i.e.,
Error result is:
Thanks.
Try Using %nrstr() instead of %str(). If you must use %str you need to mask you % signs like this %str(rAk%%B25%%)
Thank you rudfaden, Got it.
Save $250 on SAS Innovate and get a free advance copy of the new SAS For Dummies book! Use the code "SASforDummies" to register. Don't miss out, May 6-9, in Orlando, Florida.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.