Hi Anand, Thanks for the reply. I have to use a single odbc.ini file to connect to multiple SQL servers (test, prod, and uat) and databases. We have this kind of setup in our old server but now we moved to a new server (the person who set up the old server is no longer here), where I installed SAS but unable to replicate the way we used to invoke SAS i.e. SASp for production, SASq for test etc. Here is a sample of an old SASd script: - #!/usr/bin/ksh . /home/sas9/sub.profile cd /home/sasapps/uat/programs #initialize batch parameter constants BATCHPARMS="-work /home/tmp -nonews -rsasuser" nice /home/sas9/sas $BATCHPARMS -autoexec "/home/sasapps/uat/programs/autoexec.sas" & sub.profile: - PATH=/usr/bin:/etc:/usr/sbin:/usr/ucb:$HOME/bin:/usr/bin/X11:/sbin:.:\ /sybase11/bin:/home/sas9:/home/userid/utility SYBASE=/sybase11 LIBPATH=/path/to/odbc/lib/file LANG=en_US ODBCHOME=/path/to/odbc ODBCINI=/path/to/odbcini export PATH SYBASE LIBPATH LANG ODBCHOME ODBCINI autoexec.sas filename senv '/path/to/sas/programs'; %global senvcode; %global senvpath; %let senvcode = %scan(%sysfunc(pathname(SENV,f)),-2,'/'); %let senvpath = %sysfunc(pathname(SENV,f)); options nonotes; filename whoami pipe 'whoami'; data _null_; infile whoami; input; if _infile_ eq 'poldenka' then call execute('%options_statement'); run; options notes; libname sasdata '/path/to/library/data'; libname saswrite '/path/to/library'; options sasautos=("%sysfunc(pathname(SENV,f))/sasmacro" "/home2/sasapps/uat/programs/sasmacro" '!SASROOT/sasautos' ); Then from command line (old server) when I type commands like SASd, SASp, SASq, it invokes respective SAS and automatically connects to respective server. Thanks in advance!!
... View more