L507: The cursor identified in the UPDATE or DELETE statement is not open.

See the section Error SQLCODES in your IBM Database Messages and Codes manual, message -507, for information.