I don't claim to be an expert in Z/OS Stored Procedures, but I found this in the
DB2 for z/OS Stored Procedures Redbook. Since it is dated 2004, it may be obsolete. Also, in spite of the information below, a SP in z/OS may be defined as COMMIT ON RETRUN:
Remotely called stored procedures cannot execute embedded SQL Commit and/or Rollback statements unless:- The connection with the requester system uses one phase commit protocols
- The requester system indicates that commits are allowed (through sending a DRDA RDBCMTOK=TRUE indication) when the stored procedure is called.
Note: For DB2 Connect requester systems, this requires that the client application must use Connect Type 1, or Remote Unit of Work connections. Connect Type 2 or Distributed Unit of Work connections will cause DB2 Connect to indicate that commits are not allowed, thus embedded SQL Commit and/or Rollback statements in a stored procedure will fail.
Also, I found this:
An application executing in either an IMS or CICS environment or an application executing in an RRSAF environment when DB2 is not the only resource manager has attempted to execute a COMMIT statement. The SQL COMMIT statement cannot be executed in these environments.