IBM Support

PM30317: TREAT STRING AS TIMESTAMP(12) WHEN IT IS BEING COMPARED TO TIMESTAMP DATA TYPE

A fix is available

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • Treat string as timestamp(12) when it is being compared to
    timestamp data type.
    
    Additional Keywords: SQLINCORR SQLINCORROUT DB2INCORR/K
    

Local fix

  • N/A
    

Problem summary

  • ****************************************************************
    * USERS AFFECTED: All DB2 10 for z/OS users who compare a      *
    *                 TIMESTAMP value with character string        *
    ****************************************************************
    * PROBLEM DESCRIPTION: Truncation of digits on character       *
    *                      string may occur when it is being       *
    *                      compared with a TIMESTAMP value.        *
    ****************************************************************
    * RECOMMENDATION:                                              *
    ****************************************************************
    PM30317 changes how DB2 processes predicates when they involve
    TIMESTAMP data type and character string.
    DB2 used to convert the character string into TIMESTAMP with a
    precision same as the TIMESTAMP operand.  Possible truncation of
    the character string could occur resulting in loss of precision
    during comparison with a TIMESTAMP operand.
    PM30317 changes this behavior by always treating character
    string as TIMESTAMP(12) during comparison with a TIMESTAMP
    operand.
    For example:
     CREATE TABLE J.T1 (C1 TIMESTAMP(2));
     INSERT INTO J.T1 VALUES('1980-09-09-09.09.09.00');
     SELECT C1 FROM J.T1 WHERE C1 = '1980-09-09-09.09.09.00123';
    
    Before PM30317, DB2 would return a row because
    '1980-09-09-09.09.09.00123' is converted to TIMESTAMP(2).  Last
    3 digits were lost.
    
    After PM30317, DB2 will convert '1980-09-09-09.09.09.00123' into
    TIMESTAMP(12).  No precision is lost, thus, the predicate will
    be false and yield 0 rows.
    Result of applications using TIMESTAMP(6) and character
    representation of TIMESTAMP with fractional seconds less than
    or equal to 6 digits are not impacted by this change.
    
    However, this change does not apply to predicate implicitly
    generated from period specifications.
    

Problem conclusion

  • DB2 is modified to processing predicates involving TIMESTAMP
    and string correctly.
    
    Additional keyword: INCORROUT SQLDATETIME SQLTIMESTAMP
    

Temporary fix

  • *********
    * HIPER *
    *********
    

Comments

APAR Information

  • APAR number

    PM30317

  • Reported component name

    DB2 OS/390 & Z/

  • Reported component ID

    5740XYR00

  • Reported release

    A10

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    YesHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2011-01-12

  • Closed date

    2011-03-30

  • Last modified date

    2011-07-19

  • APAR is sysrouted FROM one or more of the following:

  • APAR is sysrouted TO one or more of the following:

    UK66427

Modules/Macros

  • DSNDCAST DSNDFNR  DSNXBT   DSNXGINB DSNXGLIB
    DSNXGTRF DSNXGVCM DSNXND   DSNXOBFB DSNXOBFC DSNXOBM  DSNXOCEX
    DSNXOMB  DSNXOML  DSNXOMXI DSNXOOS2 DSNXORCM DSNXORGL DSNXOW2C
    DSNXOW2D DSNXOW2F DSNXO1S
    

Fix information

  • Fixed component name

    DB2 OS/390 & Z/

  • Fixed component ID

    5740XYR00

Applicable component levels

  • RA10 PSY UK66427

       UP11/04/20 P F104

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":"10.1","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":"10.1","Edition":"","Line of Business":{"code":"","label":""}}]

Document Information

Modified date:
19 July 2011