Problem
Trying to compile a COBOL program using OpenESQL on AIX 6.1 gives an error:
<<OpenESQL Error: Unable to load ODBC Driver/Driver Manager. Ensure that your database environment is set correctly>>
The ODBC driver manager is unixODBC
Resolution
Current versions of the products, Server Express/Net Express 5.1 WrapPack 8, Studio Enterprise Edition 6.0 SP2 WS2, Visual COBOL 2.1 Update 1 and Enterprise Developer 2.1 Update 1 are all tested using unixODBC 2.3.0. For unixODBC on AIX all of the products will search for libodbcinst.a(libodbcinst.so.1) and libodbc.a(libodbc.so.1). If these shared objects cannot be found in unixODBC archive files then you will get the error described above.
First thing to check is that the unixODBC lib directory is included in the LIBPATH. If this is okay then check the members of the archive files.
If this shows anything other than libodbc.so.1 you will need to extract the file, rename it and put the new file into the archive.
Example
1. Check archive contents
ar -X32_64 -t -v libodbc.a
rwxrwxr-x 213/201 778981 13 Aug 15:13 2013 libodbc.so.2
2. Extract the file:
ar -X32_64 -x libodbc.a
3. Rename
mv libodbc.so.2 libodbc.so.1
4. Repackage
ar -rv libodbc.a libodbc.so.1
Repeat for libodbcinst.a
#unixODBCOpenESQL