DB2 stored procedures
If you use DB2 stored procedures with RRS, be aware of the following:
- DB2 stored procedures that use RRS must be managed by workload manager (WLM-managed).
- If a DB2-managed stored procedure contains WebSphere MQ calls, and it is linked with either RRS stub (CSQBRSTB or CSQBRRSI), the MQCONN or MQCONNX call returns MQRC_ENVIRONMENT_ERROR.
- If a WLM-managed stored procedure contains WebSphere MQ calls, and is linked with a non-RRS stub, the MQCONN or MQCONNX call returns MQRC_ENVIRONMENT_ERROR, unless it is the first WebSphere MQ call executed since the stored procedure address space started.
- If your DB2 stored procedure contains WebSphere MQ calls and is linked with a non-RRS stub, WebSphere MQ resources updated in that stored procedure are not committed until the stored procedure address space ends, or until a subsequent stored procedure does an MQCMIT (using a WebSphere MQ Batch/TSO stub).
- Multiple copies of the same stored procedure can execute concurrently in the same address space. Ensure that your program is coded in a reentrant manner if you want DB2 to use a single copy of your stored procedure. Otherwise you might receive MQRC_HCONN_ERROR on any WebSphere MQ call in your program.
- Do not code MQCMIT or MQBACK in a WLM-managed DB2 stored procedure.
- Design all programs to run in Language Environment (LE).
Parent topic:
Transaction management and recoverable resource manager services
fg13720_