These are the crucial parts:
export LD_LIBRARY_PATH=/usr/lib64/:/opt/sas/sashome/SASODBCDriversfortheWebInfrastructurePlatformDataServer/9.4/Driver/:$ODBCHOME/lib:/opt/sas/sashome/SASFoundation/9.4/sasexe
here you create the complete LD_LIBRARY_PATH from scratch, without any reference to an existing one.
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/lib64/:$ODBCHOME/lib
here you use the system-supplied variable and just add /usr/lib64/:$ODBCHOME/lib
I'd combine both, for safety's sake:
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/lib64/:/opt/sas/sashome/SASODBCDriversfortheWebInfrastructurePlatformDataServer/9.4/Driver/:$ODBCHOME/lib:/opt/sas/sashome/SASFoundation/9.4/sasexe
You might end up with some duplicates, but you won't miss anything.
... View more