IBM Support

SI58572 - OSP-DB-INCORROUT TIMESTAMP PRECISION LOST WITH UDT CAST FUNC

PTF Cover Letter


PTF ( Program Temporary Fixes ) Cover letter


Order this fix

Abstract

OSP-DB-INCORROUT TIMESTAMP PRECISION LOST WITH UDT CAST FUNC


Pre/Co-Requisite PTF / Fix List

REQ  LICENSED           PTF/FIX  LEVEL

TYPE PROGRAM  RELEASE   NUMBER   MIN/MAX  OPTION
---- -------- --------- -------  -------  ------
CO   5770SS1  V7R2M0    SI54070   00/00    0000



NOTICE:
-------
Application of this PTF may disable or render ineffective programs that
use system memory addresses not generated by the IBM translator,
including programs that circumvent control technology designed to limit
interactive capacity to purchased levels.  This PTF may be a prerequisite
for future PTFs.  By applying this PTF you authorize and agree to the
foregoing.

This PTF is subject to the terms of the license agreement which
accompanied, or was contained in, the Program for which you are obtaining
the PTF.  You are not authorized to install or use the PTF except as part
of a Program for which you have a valid Proof of Entitlement.

SUBJECT TO ANY WARRANTIES WHICH CAN NOT BE EXCLUDED OR EXCEPT AS EXPLICITLY
AGREED TO IN THE APPLICABLE LICENSE AGREEMENT OR AN APPLICABLE SUPPORT
AGREEMENT, IBM MAKES NO WARRANTIES OR CONDITIONS EITHER EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OR CONDITIONS OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NON INFRINGEMENT,
REGARDING THE PTF.

The applicable license agreement may have been provided to you in printed
form and/or may be viewed using the Work with Software Agreements (WRKSFWAGR)
CL command.


APAR Error Description / Circumvention

-------------------------------------------------
When an SQL user-defined type is created as a distinct type, and
the source type is a TIMESTAMP, and the TIMESTAMP does not have
the default precision, one of the generated cast functions for
the user-defined type will not have the correct TIMESTAMP
precision.

The TIMESTAMP cast function to convert from the distinct type to
the TIMESTAMP type is generated with default precision instead
of the specified precision.  This can cause extra digits of
precision to be lost.

Consider this example:

CREATE TYPE UDT_TMSP12 AS TIMESTAMP(12);

CREATE OR REPLACE PROCEDURE P1
BEGIN
DECLARE TS1 TIMESTAMP(12);
DECLARE TS2 UDT_TMSP12;
DECLARE TS3 TIMESTAMP(12);

SET TS1 = '2015-11-20-15.10.29.123456789012';
SET TS2 = UDT_TMSP12(TS1);
SET TS3 = TIMESTAMP(TS2);
END;

Both TS2 and TS3 should have a full twelve digits of timestamp
precision, but due to the incorrect TIMESTAMP cast function, the
TS3 variable has only six digits of precision.

CORRECTION FOR APAR 'SE63377' :
-------------------------------
The TIMESTAMP cast function for an SQL user-defined distinct
type with a source type of TIMESTAMP and a non-default precision
will be generated correctly.

To obtain the corrected code generation, any affected SQL
user-defined types must be recreated after this PTF is applied.

CIRCUMVENTION FOR APAR 'SE63377' :
----------------------------------
None.


Activation Instructions


None.




Special Instructions

None.


Default Instructions

THIS PTF CAN BE APPLIED IMMEDIATE OR DELAYED.



Supersedes

PTF/FIX NO(S).  APAR TITLE LINE
--------------  ------------------------------------------------------------
   SI54400      OSP-DB Internal Maintenance
   SI53198      OSP-DB MASKING LEFT ON AFTER SQL DISTINCT TYPE CREATED
   SI52608      OSP-DB-OTHER-MSGSQL0901 CREATE TYPE when file SYSTYPES is lo

Summary Information

System..............................i
Models..............................
Release.............................V7R2M0
Licensed Program...............5770SS1
APAR Fixed..........................View details for APAR SE63377
Superseded by:......................
Recompile...........................N
Library.............................QSYS
MRI Feature ........................NONE
Cum Level...........................C6127720


System 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 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":"BU054","label":"Systems w\/TPS"},"Product":{"code":"SG15V","label":"PTF Cover Letters - OS\/400 General"},"Component":"","ARM Category":[],"Platform":[{"code":"PF012","label":"IBM i"}],"Version":"V7R2M0","Edition":"","Line of Business":{"code":"","label":""}},{"Business Unit":{"code":"BU054","label":"Systems w\/TPS"},"Product":{"code":"SG16F","label":"PTF Cover Letters - IBM i 7.2 environment"},"Component":"","ARM Category":[],"Platform":[{"code":"PF012","label":"IBM i"}],"Version":"V7R2M0","Edition":"","Line of Business":{"code":"","label":""}}]

Document Information

Modified date:
26 January 2016