I faced SQLCODE = -919 sometimes while trying to run my SP thru Java online but the same SP is working fine some other time without doing anything. So I would like to know the reason why it is like that...
and here is the excerpt regarding -919 status code
-919 A ROLLBACK OPERATION IS REQUIRED
Explanation: The unit of work was placed in a state where a rollback operation is required. This can happen for the following reasons:
* An SQL statement updated a distributed database server, but the database server can be used only for read-only operations. Either updates are currently restricted to servers that support distributed two-phase commit and this application server does not support distributed two-phase commit, or updates are restricted to a single server that does not support distributed two-phase commit and this application server is not that server.
The unit of work must be terminated by a rollback operation because the update made (but not committed) at the application server cannot be committed consistently with other current or future updates made to this distributed unit of work.
* An abend occurred during the execution of a stored procedure, or a restricted SQL statement was issued from a stored procedure.
* An abend occurred during the execution of a function, or a restricted SQL statement was issued from a function.
* | The unit of work is part of a Global Transaction, and another unit of
| work in the Global Transaction has initiated a ROLLBACK. All units of
| work in the Global Transaction must now ROLLBACK.
System Action: In the IMS and CICS environments, all SQL statements are rejected until the rollback occurs. In the other environments, all SQL statements other than a static ROLLBACK are rejected until a static ROLLBACK is executed.
Programmer Response: Correct the application, function, or stored procedure, rebind it, and resubmit the job.
SQLERRP contains the name of the module that detected the previous failure and placed the application in the must-abort state.