Previous Topic: -439 - sqlstate-value IN handler-name:error-descriptionNext Topic: -502 - CURSOR ALREADY OPEN


-501 - INVALID CURSOR STATE (STMT - ID=aaaa)

Explanation

One of the following has occurred:

A cursor is in the open state following the successful execution of an OPEN statement and until the execution of a CLOSE, COMMIT WORK, or ROLLBACK WORK statement. Otherwise, a cursor is in the closed state.

Note: In CICS, an implied COMMIT WORK is issued at the end of the CICS transaction. The SQLSTATE that equates to this SQL return code is 24501.

User Response

Verify the following: