Select of BLOB or CLOB field fails with SQL0452 or MCH3601 on second loop

Date:27 May 2010
Product/Release:LANSA V12
Abstract:SELECTs where more than one row is fetched and a LANSA LOB field in the file is included in the FIELDS list fail in SuperServer
Submitted By:LANSA Technical Support

Description:

The problem affects SELECTs where more than one row is fetched and a LANSA LOB field in the file is included in the FIELDS list. It only occurs when accessing the file using SuperServer and only when reading more than one record in a select loop.

The SELECTstatement will fail with the following error on the client:

Unable to access a file that is referred to by a file reference variable.
SQL Error Code : -452
Routine : X_DBM_Fetch_Row

And the IBM i server joblog will contain

MCH3601 Escape 40 30/10/07 10:24:22.869312 QSQCLI QSYS *STMT QSQCLI QSYS *STMT
From module . . . . . . . . : SQLFT
From procedure  . . . . . . : SQLFetch
Statement . . . . . . . . . : 7609
To module . . . . . . . . . : SQLFT
To procedure  . . . . . . . : SQLFetch
Statement . . . . . . . . . : 7609
Message . . . . : Pointer not set for location referenced.
Cause . . . . . : A pointer was used, either directly or as a basing
                  pointer, that has not been set to an address.

Solution:

This issue was introduced in OS/400 V5R4 and also occurs in V6R1. IBM have resolved the issue it in the following PTFs:

  • V5R4: SI39059
  • V6R1: SI38777

If you encounter this problem, you should apply the relevant PTF for your operating system version.