Installation guide

4. Accessing Popular Databases
IBM ODBC Driver for iSeries / AS/400 DB2 servers
IBM has a Linux ODBC driver which makes this setup possible. See their web-
page on the "iSeries ODBC driver for Linux" for details:
http://www-03.ibm.com/systems/i/software/access/linux/guide/index.html
OpenLink ODBC Driver for DB2
Homepage: http://www.openlinksw.com/
DataDirect ODBC Driver for DB2
Homepage: http://www.datadirect.com/
4.4.2 General Notes
ODBC API Extensions and the IBM CLI
The ODBC API is the native IBM DB2 call level interface and provides the best
performance when interfacing to DB2.
IBM has also extended ODBC with various custom extensions they make available
as CLI interface. If you need support for those extensions, please contact
support@egenix.com
.
Configuring Database Access
If you want to use the DriverConnect() API with IBM DB2, you'll have to
configure the IBM ODBC driver's data source INI file which is named ~/db2cli.ini
and usually found in the same directory as the above script files. The file is
needed in addition to the ~/.odbc.ini file and the entries must match.
If you place the db2cli.ini file into a different directory, make sure that you setup
the environment variable DB2CLIINIPATH to point to the full path of the file.
Environment Variables on Unix
If you don't use a db2cli.ini file, you can configure the access details using
environment variables:
In order to connect to the IBM DB2 database the
DB2INSTANCE environment
variable must be set to the name of the DB2 instance you would like to connect
to.
There may be more environment variables needed, please check the scripts that
come with DB2 called
db2profile (for bash) or db2cshrc (for C shell) which set
47