Stored procedures for ODBC applications
You can design an application to run in two parts: one part on the client and one part on the server. Stored procedures are server applications that run at the database, within the same transaction as a client application.
You can write stored procedures with either embedded SQL or Db2 ODBC functions.
Both the main application that calls a stored procedure and a stored procedure itself can be either a Db2 ODBC application or a standard Db2 precompiled application. You can use any combination of embedded SQL and Db2 ODBC applications. The following figure illustrates this concept.