A fix is available
APAR status
Closed as program error.
Error description
Serviceability enhancement for INSERT statement that contains YEAR , DATE , OR SUBSTR built in functions Additional symptoms and search keywords SQLDATE SQLYEAR
Local fix
N/A
Problem summary
**************************************************************** * USERS AFFECTED: All DB2 11 for z/OS users of an SQL * * statement that contains a function DATE or * * YEAR in a predicate. * **************************************************************** * PROBLEM DESCRIPTION: SQLCODE180 at DSNXRINT could be issued * * for an SQL statement that contains a * * function DATE or YEAR in a predicate. * **************************************************************** * RECOMMENDATION: * **************************************************************** An example is shown below: CREATE TABLE T1( C1 TIMESTAMP , C2 INT ); CREATE TABLE T2( C1 TIMESTAMP , C2 INT ); INSERT INTO T1 SELECT * FROM T2 WHERE YEAR(C1) = YEAR(X'0000000000') AND -1 = 0 ; SELECT * FROM( SELECT * FROM T1 UNION ALL SELECT * FROM T2 WHERE YEAR(C1) = YEAR(X'0000000000') AND C2 = 1 ) TX(C1, C2) WHERE C2 = 2 SQLCODE180 is issued for the invalid expression YEAR(X'0000000000') in the INSERT and SELECT statements, while in DB2 10, the same SQL statements would not cause the SQLCODE180.
Problem conclusion
DB2 has been modified to make it possible to make the aforementioned SQL statements work the same as DB2 10, so there will be no SQLCODE180. Additional keywords: SQLINSWSELECT SQLINSERT SQLTIME SQLDATE SQLTIMESTAMP
Temporary fix
Comments
APAR Information
APAR number
PI47546
Reported component name
DB2 OS/390 & Z/
Reported component ID
5740XYR00
Reported release
B10
Status
CLOSED PER
PE
NoPE
HIPER
NoHIPER
Special Attention
NoSpecatt
Submitted date
2015-08-25
Closed date
2015-10-21
Last modified date
2015-12-02
APAR is sysrouted FROM one or more of the following:
APAR is sysrouted TO one or more of the following:
UI32283
Modules/Macros
DSNXOASG DSNXOIN DSNXOSP
Fix information
Fixed component name
DB2 OS/390 & Z/
Fixed component ID
5740XYR00
Applicable component levels
RB10 PSY UI32283
UP15/11/06 P F511
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.
[{"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSEPEK","label":"Db2 for z\/OS"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"11.0","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}},{"Business Unit":{"code":"BU054","label":"Systems w\/TPS"},"Product":{"code":"SG19M","label":"APARs - z\/OS environment"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"11.0","Edition":"","Line of Business":{"code":"","label":""}}]
Document Information
Modified date:
02 December 2015