This is neither functions or macros, it is simply using macro variables. %let my_db_dsn = 'DATA64'; %let my_db_user = 'user'; %let my_db_password = 'password'; LIBNAME mylib odbc dsn=&my_db_dsn user=&my_db_user password=&my_db_password; The quotes are not necessary, although they may be required when the password contains special characters like periods or semi-colons that would confuse SAS parser.
... View more