IBM Support

IZ28794: IBM DB2 DRIVER FOR JDBC AND SQLJ TRUNCATES TRAILING ZEROS WHEN RETRIEVING STRING VALUE FOR TIMESTAMP BY RESULTSET.GETSTRING().

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • IBM DB2 Driver for JDBC and SQLJ (Jcc) truncates trailing zeros
    when it retrieves string value for Timestamp column by
    Resultset.getString().
    The behavior is based on java.sql.Timestamp.toString() method
    and expected one. However CLI-based Legacy JDBC driver does not
    truncate the zeros and it caused incompatibility between the
    JDBC drivers.
    This APAR addresses the compatibility issue by new datasource
    property for Jcc driver.
    .
    Property name: timestampPrecisionReporting
    Specifies whether to truncate the trailing 0s when retrieveing
    Timestamp values as string.
    The data type of this property is integer. Possible values are
    TIMESTAMP_JDBC_STANDARD (1): Indicate to follow standard JDBC
    TimeStamp implementation, where any trailing zeros are trimmed.
    TIMESTAMP_ZERO_PADDING (2) : Indicate that trailing zeros are
    kept up to the defined precision of the column.
    The default value is TIMESTAMP_JDBC_STANDARD (1).
    

Local fix

Problem summary

  • Users affected:
    Users who use IBM DB2 Driver for JDBC and SQLJ (com.ibm.jcc.*).
    .
    Problem Description:
    IBM DB2 Driver for JDBC and SQLJ (Jcc) truncates trailing zeros
    when it retrieves string value for Timestamp column by
    Resultset.getString().
    The behavior is based on java.sql.Timestamp.toString() method
    and expected one. However CLI-based Legacy JDBC driver does not
    truncate the zeros and it caused incompatibility between the
    JDBC drivers.
    .
    Problem Summary:
    This APAR addresses the compatibility issue by new datasource
    property for Jcc driver.
    The property name is timestampPrecisionReporting.
    The type is integer. Possible values are:
    TIMESTAMP_JDBC_STANDARD (1): Indicate to follow standard JDBC
    TimeStamp implementation, where any trailing zeros are trimmed.
    TIMESTAMP_ZERO_PADDING (2) : Indicate that trailing zeros are
    kept up to the defined precision of the column.
    The default value is TIMESTAMP_JDBC_STANDARD (1).
    

Problem conclusion

  • This problem was first fixed in DB2 9.1, FixPack 6 (s081007).
    

Temporary fix

Comments

APAR Information

  • APAR number

    IZ28794

  • Reported component name

    DB2 UDB ESE AIX

  • Reported component ID

    5765F4100

  • Reported release

    910

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2008-08-05

  • Closed date

    2008-11-07

  • Last modified date

    2008-11-07

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

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

    IZ28944

Modules/Macros

  • ENGN_JCC
    

Fix information

  • Fixed component name

    DB2 UDB ESE AIX

  • Fixed component ID

    5765F4100

Applicable component levels

  • R910 PSN

       UP

[{"Line of Business":{"code":"LOB10","label":"Data and AI"},"Business Unit":{"code":"BU053","label":"Cloud \u0026 Data Platform"},"Product":{"code":"SSEPGG","label":"DB2 for Linux- UNIX and Windows"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"910"}]

Document Information

Modified date:
03 October 2021