Finally got the solution for this issue .
It had to do with which variation of the installed 9.7 cli driver was used by unixODBC
isql works fine with the single threaded driver file libdb2.so.1
for CAS server and sas which are multi threaded needed to use libdb2o.so.1 . Thanks to Sam Loflin from sas for figuring it out.
as usual this is probably documented by IBM where only Watson can find 🙂
I suggest this and similar database connectivity should be added to SAS Viya documentation . I would also appreciate if someone can document the use of dm_unicode =UTF-16 during ODBC database connections