L500: IDENTIFIED CURSOR WAS CLOSED WHEN THE CONNECTION WAS DESTROYED

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