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.

Every DB2 UDB CLI application contains the three main tasks that are shown in the following figure. If the functions are not called in the sequence that is shown in the figure, an error results. Figure 1. Conceptual view of a DB2 UDB CLI application

Conceptual View of a DB2 UDB CLI Application

The initialization task allocates and initializes resources in preparation for the main Transaction Processing task.

The transaction processing task, the main task of the application, passes queries and modifications to the SQL to DB2 UDB CLI.

The termination task frees allocated resources. The resources generally consist of data areas that are identified by unique handles. After freeing the resources, other tasks can use these handles.

In addition to the three central tasks that control a DB2 UDB CLI application, there are numerous general tasks, such as diagnostic message handlers, throughout an application.

See Categories of DB2 UDB CLIs for an overview of how the CLI functions fit into these key task areas.

 

Parent topic:

SQL call level interface

 

Related concepts


DB2 UDB CLI functions