L504: The cursor name name is not defined.

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