SQL call level interface
DB2® UDB call level interface (CLI) is a callable Structured Query Language (SQL) programming interface that is supported in all DB2 environments.
A callable SQL interface is a WinSock application programming interface (API) for database access that uses function calls to start dynamic SQL statements.
DB2 UDB CLI is an alternative to embedded dynamic SQL. The important difference between embedded dynamic SQL and DB2 UDB CLI is how the SQL statements are started. On the i5/OS® operating system, this interface is available to any of the Integrated Language Environment® (ILE) languages.
DB2 UDB CLI also provides full Level 1 Microsoft® Open Database Connectivity (ODBC) support, plus many Level 2 functions. For the most part, ODBC is a superset of the American National Standards Institute (ANSI) and ISO SQL CLI standard.
By using the code examples, you agree to the terms of the Code license and disclaimer information.
- What's new for V5R4
This topic highlights the changes made to this topic collection for V5R4.
- Printable PDF
Use this to view and print a PDF of this information.
- Getting started with DB2 UDB CLI
To get started with DB2 UDB call level interface (CLI), know the basics of DB2 UDB CLI, how it compares to embedded SQL, and how to select the best interface for your programming needs.
- Writing a DB2 UDB CLI application
A DB2 UDB CLI application consists of a set of tasks; each task consists of a set of discrete steps. Other tasks might occur throughout the application when it runs. The application calls one or more DB2 UDB CLI functions to carry out each of these tasks.
- DB2 UDB CLI functions
These DB2 UDB call level interface APIs are available for database access on the i5/OS operating system. Each of the DB2 UDB CLI function descriptions is presented in a consistent format.
- DB2 UDB CLI include file
The only include file used in DB2 UDB call level interface (CLI) is sqlcli.h.
- Running DB2 UDB CLI in server mode
The reason for running in SQL server mode is that many applications need to act as database servers. This means that a single job performs SQL requests on behalf of multiple users.
- Examples: DB2 UDB CLI applications
These examples have been drawn from the applications provided in the SQL call level interface topic collection. Detailed error checking has not been implemented in the examples.