Stored procedures, user-defined functions, and commitment control

When an application such as Interactive SQL is running without commitment control active (COMMIT(*NONE)) over a DRDA® connection, it is possible for an invoked stored procedure or user-defined function (UDF) to start commitment control on an iSeries™ server.

This results in a mismatch in commitment control between the client and the server, causing the possibility of uncommitted updates when the application terminates.

You should avoid this situation. If, however, you choose to implement it, one solution is for the stored procedure or UDF running under commitment control to explicitly commit all of its database updates. If that is not done, the server will detect the pending updates during the disconnection process and automatically commit the pending work.