IBM Support

JR39265: ODBC CONNECTOR INCORRECTLY CREATES A TABLE WITH VARCHAR DATATYPE WHEN THE SCHEMA IN THE COLUMNS TAB IS SET TO NVARCHAR

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as fixed if next.

Error description

  • ODBC Connector is creating the table with the varchar/char type
    even when the fields in the columns tab in the Datastage job are
    set to nvarchar/nchar type when the replace/create table action
    are specified. This can cause a mismatch in the schema while
    writing the data into the table.
    

Local fix

  • Provide the SQL Statement in the text-box, while using the
    create/replace option in the ODBC Connector.
    

Problem summary

  • ODBC Connector is creating the table with the varchar/char type
    even when the fields in the columns tab in the Datastage job are
    set to nvarchar/nchar type when the replace/create table action
    are specified. This can cause a mismatch in the schema while
    writing the data into the table.
    
    Analysis : The problem is caused since we are passing
    SQL_CHAR/SQL_VARCHAR to the SQLGetTypeInfo function to retrieve
    the database native data type irrespective of whether the
    datatype is defined as char/nchar or varchar/nvarchar in the
    columns tab. When the ODBC Type is checked in the datafield from
    the dataset definition, the ODBC Type is set correctly. So, the
    problem is in passing the ODBC type to the SQLGetTypeInfo
    function to retrieve the database native data type.
    

Problem conclusion

Temporary fix

  • The problem can be worked around by providing the table DDL in
    the CreateStatement property by setting the 'Generate create
    statement at runtime' to NO.
    

Comments

APAR Information

  • APAR number

    JR39265

  • Reported component name

    WIS DATASTAGE

  • Reported component ID

    5724Q36DS

  • Reported release

    850

  • Status

    CLOSED FIN

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2011-03-29

  • Closed date

    2011-04-26

  • Last modified date

    2011-12-22

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

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

Fix information

Applicable component levels

  • R850 PSY

       UP

[{"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSVSEF","label":"InfoSphere DataStage"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"8.5","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Document Information

Modified date:
11 October 2021