A fix is available
APAR status
Closed as program error.
Error description
IncorrOut (No Row Found) on select from cursor with spatial unfenced UDF involved after the previous successful select on the same cursor. Additional Keywords: SQLINCORR SQLINCORROUT SQLDB2INCORR/K SQLSPATIAL SQLUDF
Local fix
Change the UDF to a fenced one to work around the problem.
Problem summary
**************************************************************** * USERS AFFECTED: All DB2 9 and DB2 10 for z/OS users of * * spatial support. * **************************************************************** * PROBLEM DESCRIPTION: Incorrect output for a row not found * * might happen, when a spatial UDF is * * used in a SELECT statement after this * * SELECT statement had successfully * * returned a row from previous fetch. * **************************************************************** * RECOMMENDATION: * **************************************************************** The following example can illustrate the problem. A spatial UDF is used in the following simple query. Table T1 has two columns ID and SHAPE, and it only contains one row which qualifies the following predicate when HV1 is set to 61.0 and HV2 is set to 63.0. EXEC SQL DECLARE W_CSR CURSOR FOR SELECT ID FROM T1 WHERE DB2GSE.ST_CONTAINS( SHAPE,DB2GSE.ST_POINT ( :HV1, :HV2, 1)) = 1 FETCH FIRST 1 ROWS ONLY WITH UR ; I = 1; DO WHILE ( I<=2 ); EXEC SQL OPEN W_CSR ; EXEC SQL FETCH W_CSR INTO :HID; PUT SKIP LIST ('MESSAGE HERE', HID, SQLCODE); EXEC SQL CLOSE W_CSR ; I = I + 1 ; END; Inside the loop, the first iteration returns a correct value for column ID, but the second iteration returns SQLCODE +100 for row not found incorrectly when the same HV1 and HV2 input are used. DB2 does not handle the spatial UDF properly during the CLOSE W_CSR cursor time after the first iteration is finished. A residual value inside the internal structure of the spatial UDF makes the second iteration return row not found incorrectly.
Problem conclusion
DB2 code has been changed to address this incorrout issue when a spatial UDF is used in a query. Additional Keywords: DB2INCORR/K SQLINCORR INCORROUT SQLINCORROUT SQLSPATIAL
Temporary fix
********* * HIPER * *********
Comments
APAR Information
APAR number
PM77332
Reported component name
DB2 OS/390 & Z/
Reported component ID
5740XYR00
Reported release
910
Status
CLOSED PER
PE
NoPE
HIPER
YesHIPER
Special Attention
NoSpecatt
Submitted date
2012-11-19
Closed date
2013-01-15
Last modified date
2013-02-04
APAR is sysrouted FROM one or more of the following:
APAR is sysrouted TO one or more of the following:
UK90966 UK90967
Modules/Macros
DSNXGUDF
Fix information
Fixed component name
DB2 OS/390 & Z/
Fixed component ID
5740XYR00
Applicable component levels
Fix is available
Select the PTF appropriate for your component level. You will be required to sign in. Distribution on physical media is not available in all countries.
Rate this page:
Average rating
Copyright and trademark information
IBM, the IBM logo and ibm.com are trademarks of International Business Machines Corp., registered in many jurisdictions worldwide. Other product and service names might be trademarks of IBM or other companies. A current list of IBM trademarks is available on the Web at "Copyright and trademark information" at www.ibm.com/legal/copytrade.shtml.