Application Building Guide

DB2 Call Level Interface (CLI) Applications

The DB2 AD Client comes with sample programs that use DB2 Call Level Interface (DB2 CLI) function calls. You can study the samples to learn how to access DB2 databases using these function calls in your applications.

DB2 CLI applications that conform to ODBC can be ported to work under ODBC, provided you recompile the application using an ODBC SDK (not included with DB2), and provided an ODBC driver manager is available on the application platform.

The sample programs, the build files, and a makefile, are contained in the directory sqllib/samples/cli on UNIX, or %DB2PATH%\samples\cli on OS/2 and Windows 32-bit operating systems. You may need to modify the compiler options in the build files and the makefile for your environment.

The following are the sample programs used in this book to demonstrate the steps for building and running DB2 CLI applications (the steps you follow may vary, depending on your environment):

tbinfo
Demonstrates how to get and set information at a table level.

dbusemx
Demonstrates how to use a single database in conjunction with embedded SQL.

dbmconn
Demonstrates how to connect to, and disconnect from, multiple databases.

spclient
is the client program of a client/server example; the server program is spserver.

spserver
is the server program of a client/server example; the client program is spclient.

udfcli
uses the functions created by the user-defined function program, udfsrv .

For a more detailed description of all the DB2 CLI sample programs, see Table 7. The CLI Guide and Reference explains how the samples using DB2 CLI work.

The following list points you to where you can find building information for the DB2 CLI applications and stored procedures for the supported platform C compilers:

AIX IBM C
"DB2 CLI Applications" and "DB2 CLI Stored Procedures".

AIX IBM VisualAge C++
"DB2 CLI Applications" and "DB2 CLI Stored Procedures".

HP-UX C
"DB2 CLI Applications" and "DB2 CLI Stored Procedures"

GNU/Linux gcc
"DB2 CLI Applications" and "DB2 CLI Stored Procedures"

OS/2 IBM VisualAge Version 3 for C++
"DB2 CLI Applications" and "DB2 CLI Stored Procedures"

OS/2 IBM VisualAge Version 4 for C++
"DB2 CLI Applications" and "DB2 CLI Stored Procedures".

Silicon Graphics IRIX MIPSpro C
"DB2 CLI Applications"

Solaris SPARCompiler C and IBM C
"DB2 CLI Applications" and "DB2 CLI Stored Procedures"

Windows 32-bit Operating Systems Microsoft Visual C++
"DB2 CLI Applications" and "DB2 CLI Stored Procedures"

Windows 32-bit Operating Systems IBM VisualAge for C++ Version 3.5
"DB2 CLI Applications" and "DB2 CLI Stored Procedures"

Windows 32-bit Operating Systems IBM VisualAge for C++ Version 4.0
"DB2 CLI Applications" and "DB2 CLI Stored Procedures".


[ Top of Page | Previous Page | Next Page ]