-20411   A FETCH CURRENT CONTINUE OPERATION WAS REQUESTED FOR cursor-name BUT THERE IS NO PRESERVED, TRUNCATED DATA TO RETURN

Explanation

The application issued a FETCH request with the CURRENT CONTINUE clause for cursor cursor-name, however, there is no preserved, truncated data that can be returned. One of the following errors might have occurred:
  • An operation has occurred since the previous FETCH for this cursor that caused DB2® to discard the preserved, truncated data.
  • CONTINUE was specified on the FETCH statement, but the previous FETCH for this cursor did not specify the WITH CONTINUE clause to enable preservation of truncated data.
  • The cursor is open but not positioned on a row.
  • A FETCH WITH CONTINUE was executed successfully, but the LOB or XML columns were not truncated.

System action

The statement is not processed. No data is written to the output host variable referenced on the FETCH.

Problem determination

Verify that the application has successfully completed a FETCH using the WITH CONTINUE clause, and, that it received a truncation warning for a LOB or XML column prior to performing the FETCH CURRENT CONTINUE operation. This verification can be done by checking the SQLWARN1 field in the SQLCA following the FETCH and by examining the output length for LOB and XML columns.

SQLSTATE

24524