As SAS does not provide an ODBC driver manager for the UNIX platforms.So third part ODBC manager for Unix should be installed first. e.g unixodbc (unixODBC) or iODBC (iODBC.org).

After it installed and AIS datasource added to ODBC manager (For detail steps, please refer to http://www.attunity.com/forums/odbc-drivers/how-config-ais-odbc-thinclient-datasource-1384.html.) :

1) ODBC related environment variables should be added to SAS OS account's profile

e.g

setenv ODBCINI /home/apsup/iODBC/etc/odbc.ini
setenv ODBCINSTINI /home/apsup/iODBC/etc/odbcinst.ini
setenv ODBCHOME /home/apsup/iODBC
setenv LIBPATH /home/apsup/thinodbc51:/home/apsup/iODBC/lib

2) Those should be add to SAS server 's script:

cat /appl/SAS/SASAPP/SASFoundation/9.2/bin/sasenv_local

setenv ODBCINI /home/apsup/iODBC/etc/odbc.ini
setenv ODBCINSTINI /home/apsup/iODBC/etc/odbcinst.ini
setenv ODBCHOME /home/apsup/iODBC
setenv LIBPATH /home/apsup/thinodbc51:/home/apsup/iODBC/lib

3) Test it with script e.g /tmp/test2.sh

test2.sh:

/appl/SAS/SASAPP/SASFoundation/9.2/sas -sysin /tmp/test2.sas -log /tmp/test2.log

test2.sas:

libname YYY odbc noprompt="DSN=disam";
libname xxx "/tmp";
data xxx.test;
set YYY.service_context;
run;

A data set will be created. ( Take Note, you can only run the script if you have BASE SAS installed with SAS/Access Interface ODBC product licensed.)