This code works in SAS EG for local (hidden sensitive information):
*---- two values: DEV (ALIASDEV) and PROD (ALIASPROD);
%let my_environment = ALIASDEV;
%let ALIASPROD= (hidden_tns_prod);
%let ALIASDEV= (hidden_tns_dev);
libname mylib oracle user=username password='my_password' path="&&my_environment";
But this code is not (with rsubmit;)
rsubmit;
*---- two values: DEV (ALIASDEV) and PROD (ALIASPROD);
%let my_environment = ALIASDEV;
%let ALIASPROD= (hidden_tns_prod);
%let ALIASDEV= (hidden_tns_dev);
libname mylib oracle user=username password='my_password' path="&&my_environment";
endrsubmit;
here is the error message:
ERROR: connection error ORACLE: ORA-12154: TNS: could not resolve the specified connection identifier. ERROR: error in LIBNAME statement.
What I'm trying to do is have a macro (my_environment) which I can easily switch between my dev and prod databases.
thank
source
share