Db2 for z/OS stored procedures use of ODBA
Db2 for z/OS® stored procedures connecting to ODBA must run in a z/OS Workload Manager-managed (WLM-managed) stored procedures address space.
Db2 for z/OS establishes the ODBA environment by specifying either the INIT subfunction or the CONNECT subfunction of the CIMS call for the stored procedure address space. If the CIMS INIT call is issued, the connection to a specific IMS DB occurs when the APSB call is issued. If the CIMS CONNECT call is used, the connection to one or more IMS DB systems can optionally occur either when the CIMS CONNECT call is issued or when the APSB call is issued.
Each stored procedure running in the stored procedure address space runs under its own TCB that is established by Db2 for z/OS when the stored procedure is initialized. Db2 for z/OS issues the commit call on behalf of the stored procedure when control is returned to Db2 for z/OS. Only the PREP subfunction of the DPSB call should be issued by the stored procedures.
The following figure illustrates the connection from a Db2 for z/OS stored procedures address space to an IMS DB subsystem. This connection allows DL/I data to be presented through an SQL interface, either locally to this Db2 for z/OS or to DRDA connected Db2 for z/OS databases.

