E441: SQL CONNECT error, SQLCODE =
-1, SQLSTATE = IM002
error when trying to compile the
testdb2.ezt sample source using ODBC driver
Release : 11.6
Component : CA EASYTRIEVE REPORT GENERATOR FOR FOR LINUX PC
Check
the odbc.ini file, please - this is an example:
....
[sample]
Description = Test to DB2
Driver = DB2
...
and odbcinst.ini file too, please:
...
[DB2]
Description = DB2 Driver
Driver=/opt/ibm/db2/V11.1/lib32/libdb2.so
Driver64=/opt/ibm/db2/V11.1/lib64/libdb2.so
FileUsage = 1
DontDLClose = 1
...
This is an example of the eztprofile file when using
DB2 via ODBC:
...
# Please see $EZT variable in /etc/profile.CA -
usually it is set to /opt/CA/ezt
export USR_PATH=/usr/bin:/usr/lib:/usr/local/lib
export EZTPATH=$EZT/bin:$EZT/eztpgms:$USR_PATH
export PATH=$PATH:$EZTPATH
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$EZTPATH
export EZTOPTS="-W a,--32 -I $EZT/macros"
# To link with ODBC libraries, uncomment the lines below (requires unixODBC to
be installed)
export EZTSQL=odbc
export EZTLIBS=-lodbc
...