IBM GC09-2830-00 Server User Manual


 
OS/2 Client Access to DB2 using CLI/ODBC
Before DB2 CLI and ODBC applications can successfully access a DB2
database from an OS/2 client, perform the following steps on the client
system:
1. The DB2 database (and node if the database is remote) must be cataloged.
To do so, use the CCA (or the command line processor).
For more information see the on-line help in the CCA
2. If you are using ODBC applications to access DB2 data, perform the
following steps. (If you are using only CLI applications, skip this step and
go to the next step.)
a. Check that there is an ODBC Driver Manager installed. The ODBC
Driver Manager is not installed with DB2; we suggest you use the
Driver Manager that was shipped with your ODBC application. Also
ensure that the DB2 CLI/ODBC driver is installed:
1) Run the ODBC Administration tool as described in its
documentation. This is usually done in one of two ways:
v Double-click on the ODBC Folder in OS/2, and double-click on
the ODBC Administrator icon.
v Run odbcadm.exe from the command line.
The Data Sources window opens.
2) Click on the Drivers push button. The Drivers window opens.
3) Verify that IBM DB2 ODBC DRIVER is shown in the list.
If the ODBC Driver Manager is not installed then follow the
installation instructions that came with your ODBC application. If the
IBM DB2 CLI/ODBC driver is not installed then double-click on the
Install ODBC Driver icon in the DB2 folder to install the DB2
CLI/ODBC driver.
b. Register the DB2 database with the ODBC driver manager as a data
source using either of these methods:
v Using the CCA:
1) Select the DB2 database alias that you want to add as a data
source.
2) Click on the Properties push button.
3) Select the Register this database for ODBC check box.
v Using the ODBC Driver Manager:
1) Run the ODBC Driver Manager, as described in its
documentation. This is usually done in one of two ways:
Double-click on the ODBC Folder in OS/2, and double-click
on the ODBC Administrator icon.
Run odbcadm.exe from the command line.
Chapter 10. Running Your Own Applications 125