Master Mainframe Technologies - COBOL, JCL, DB2, VSAM, CICS & More
ABEND Codes SQLCODEs File Status Interview Prep Contact
← Back to SQLCODE Reference
Error

SQLCODE -507

Cursor not open for UPDATE

Explanation

Cursor not declared FOR UPDATE but UPDATE WHERE CURRENT attempted.

Solution

Add FOR UPDATE clause to cursor declaration.

Example

DECLARE cursor FOR SELECT... -- missing FOR UPDATE