IBM Support

SE74998 - OSP-DB-OTHER-F/QQQSRVI1-T/QQQSRVI1-MSGCPF9898 SQL STATEMENT
FAILS WITH SQL0901/CPF9898 IF PUT INTO A FUNCTION

Subscribe to this APAR

By subscribing, you receive periodic emails alerting you to the status of the APAR, along with a link to the fix after it becomes available. You can track this item individually or track all items by product.

Notify me when this APAR changes.

Notify me when an APAR for this component changes.

APAR (Authorized Program Analysis Report)

Abstract

OSP-DB-OTHER-F/QQQSRVI1-T/QQQSRVI1-MSGCPF9898 SQL STATEMENT
FAILS WITH SQL0901/CPF9898 IF PUT INTO A FUNCTION

Error Description

The following errors are received if you take a working SQL    
statement and put it in a function.                            
                                                               
CPF9898 Escape 40 11/19/20 20:17:03.712928 QQQSRVI1 QSYS *STMT  
QQQSRVV1 QSYS *STMT                                            
From user . . . . . . . . . : XXXXXXXX                          
From module . . . . . . . . : QQQFNCHK                          
From procedure . . . . . . : QQFUNCTIONCHECK                    
Statement . . . . . . . . . : 1358                              
To module . . . . . . . . . : QQQINLQDT                        
To procedure . . . . . . . : RESET_QDT_SPECS                    
Statement . . . . . . . . . : 9396                              
Message . . . . : invalid correlated field..                    
Cause . . . . . : This message is used by application programs  
as a general                                                    
escape message.                                                
                                                               
CPF4204 Escape 50 11/19/20 20:17:03.713180 QQQQUERY QSYS *STMT  
QQQQUERY QSYS *STMT                                            
From user . . . . . . . . . : XXXXXXXX                          
From module . . . . . . . . : QQQQUERY                          
From procedure . . . . . . : QQQQUERY                          
Statement . . . . . . . . . : 35004                            
To module . . . . . . . . . : QQQQUERY                          
To procedure . . . . . . . : QQQQUERY                          
Statement . . . . . . . . . : 35004                            
Message . . . . : Internal failure occurred in query processor.
Cause . . . . . : A system failure has occurred in the query    
processor                                                      
program. The query definition template number is 1. Recovery .  
. . : See                                                      
the low-level messages. Correct any errors and try your request
again. If                                                      
the problem continues, report the problem (ANZPRB command).    
                                                               
SQL0901 Diagnostic 50 11/19/20 20:17:03.872164 QSQRUN1 QSYS    
*STMT QSQRUN1 QSYS *STMT                                        
From user . . . . . . . . . : XXXXXXXX                          
From module . . . . . . . . : QSQPREP                          
From procedure . . . . . . : CLEANUP                            
Statement . . . . . . . . . : 12015                            
To module . . . . . . . . . : QSQPREP                          
To procedure . . . . . . . : CLEANUP                            
Statement . . . . . . . . . : 12015                            
Message . . . . : SQL system error.                            
Cause . . . . . : An SQL system error has occurred. The current
SQL                                                            
statement cannot be completed successfully. The error will not  
prevent                                                        
other SQL statements from being processed. Previous messages    
may indicate                                                    
that there is a problem with the SQL statement and SQL did not  
correctly                                                      
diagnose the error. The previous message identifier was        
CPF4204. Internal                                              
error type 3002 has occurred. If precompiling, processing will  
not continue                                                    
beyond this statement. Recovery . . . : See the previous        
messages to                                                    
determine if there is a problem with the SQL statement. To view
the                                                            
messages, use the DSPJOBLOG command if running interactively,  
or the WRKJOB                                                  
command to view the output of a precompile. An application      
program                                                        
receiving this return code may attempt further SQL statements.  
Correct any                                                    
errors and try the request again.                              

Problem Summary

A user defined table function that contains two CTEs one with a
subquery and one with a union fails with a CPF9898 followed by a
SQL0901.                                                        

Problem Conclusion

This problem has been corrected.                                

Temporary Fix

Comments

Circumvention


PTFs Available

R730 SI75270  1245

R740 SI85832  1000

R750 SI85831  1000

Affected Modules


         
         

Affected Publications

Summary Information

Status............................  CLOSED PER
HIPER.............................  No
Component.........................  5770SS1DBSI8
Failing Module....................  RCHMGR
Reported Release..................  R730
Duplicate Of......................  




IBM i Support

IBM disclaims all warranties, whether express or implied, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose. By furnishing this document, IBM grants no licenses to any related patents or copyrights. Copyright © 1996,1997,1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023, 2024 IBM Corporation. Any trademarks and product or brand names referenced in this document are the property of their respective owners. Consult the Terms of use link for trademark information

[{"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Platform":[{"code":"PF012","label":"IBM i"}],"Version":"7.2.0; 7.3.0; 7.4.0; 7.5.0","Product":{"code":"SWG60","label":"IBM i"},"Component":"5770SS1","Edition":"","Line of Business":{"code":"LOB57","label":"Power"}}]

Document Information

Modified date:
12 March 2024