Error
SQLCODE -508
CLOSE cursor already closed
Explanation
Attempting to close a cursor that is already closed.
Solution
Check program logic, ensure CLOSE is not executed twice.
Example
CLOSE cursor executed in loop
CLOSE cursor already closed
Attempting to close a cursor that is already closed.
Check program logic, ensure CLOSE is not executed twice.