ODBC access to iSeries from 64-bit linux

I’m attempting to access an iSeries database using ODBC and Ubuntu 12.04 server. This works fine from the 32bit version of Ubuntu and windows. However the 64-bit version of Ubuntu is proving to be more difficult. I have installed unixodbc and the iSeries access for Linux.  I configured the /etc/odbcinst.ini and /etc/odbc.ini. when I run isql –v “dsn_name” I get the error:

[01000][unixODBC][Driver Manager]Can't open lib '/opt/ibm/iSeriesAccess/lib64/libcwbodbc.so' : file not found
[ISQL]ERROR: Could not SQLConnect

Here is an example of my odbcinst.ini file:
[iSeries Access ODBC Driver]
Description             = iSeries Access for Linux ODBC Driver
Driver          = /opt/ibm/iSeriesAccess/lib/libcwbodbc.so
Setup           = /opt/ibm/iSeriesAccess/lib/libcwbodbcs.so
NOTE1           = If using unixODBC 2.2.11 or later and you want the 32 and 64-bit ODBC drivers to share DSN's,
NOTE2           = the following Driver64/Setup64 keywords will provide that support.
Driver64                = /opt/ibm/iSeriesAccess/lib64/libcwbodbc.so
Setup64         = /opt/ibm/iSeriesAccess/lib64/libcwbodbcs.so
Threading               = 2
DontDLClose             = 1
UsageCount              = 1

And my /etc/odbc.ini file:
Description = iSeries Access ODBC Driver DSN for iSeries
Driver = iSeries Access ODBC Driver
System = ip address here
UserID = my_username
Password = my_password
Naming = 0
DefaultLibraries = QGPL
ConnectionType = 0
CommitMode = 2
ExtendedDynamic = 0
DefaultPkgLibrary = QGPL
DefaultPackage = A/DEFAULT(IBM),2,0,1,0,512
AllowDataCompression = 1
LibraryView = 0
AllowUnsupportedChar = 0
ForceTranslation = 0
Trace = 0
CCSID = 1208
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Gary PattersonVP Technology / Senior Consultant Commented:
Does /opt/ibm/iSeriesAccess/lib64/libcwbodbc.so exist, and if so, do you have rights to it?

This may be the dependency problem noted in the installation instructions:

If the installation fails because of a dependency on libodbcinst.so, make sure you have the unixODBC driver manager installed. If the problem persists, run the installation command with the --nodeps parameter to stop dependency checking.


- Gary Patterson
Use ldd command to check the library that fails to load.
Some otherfileisnot found,and you need to add it to your LIBPATH
Try put a symbolic link from /opt/ibm/iSeriesAccess/lib to /usr/lib64 and post if there is any errors.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.