The current statement refers to a cursor that has not been opened. Review the logic of the program to see how it failed to execute the OPEN statement before it reached this point. Statements that end transactions (COMMIT WORK and ROLLBACK WORK) also close cursors unless the cursors are declared WITH HOLD.