IBM Sterling Transformation Extender

Sterling Transformation Extender

Come for answers, stay for best practices. All we're missing is you.


#Sterling
#Supplychain
 View Only
  • 1.  Can't write zero (0) to DB2 whatever I do.

    Posted 09/02/11 09:49 AM

    Originally posted by: WaldemarHaszlakiewicz


    Hi

    I have a strange problem that I can't fix (WTX 8.3.0.4 on Windows 7 64 bit)

    For input I have an XML file (on windows):
    ...
    <RFMSlot>
    <CpgnID>5</CpgnID>
    <LDate>18042008</LDate>
    <EDate>30042008</EDate>
    <ACnt>25.00</ACnt>
    <VCnt>1</VCnt>
    <PCnt>0</PCnt>
    </RFMSlot>
    ...

    and for output I have a DB2 (on host) table with PCnt defined as integer (Default: NULL).
    and have created TypeTree with 'Database Interface Designer'.

    So now if PCnt is any value except 0, the row is written perfectly and all is good.
    But when the value is 0, the value is always written as NULL. And there is nothing I can do to change that.
    I've tried all sorts of padding, inserting hex values,.. whatever I try the 0 value doesn't come across to DB2.

    Sometimes it gets even worst and I get next trace:

    <2448-4796-09/02/11 14:44:02>: The columns are of the following types:
    <2448-4796-09/02/11 14:44:02>: Column 1 (XLS) type is DECIMAL, precision is 16.
    <2448-4796-09/02/11 14:44:02>: Column 2 (ZAP_ST) type is SMALLINT, precision is 5.
    <2448-4796-09/02/11 14:44:02>: Column 3 (KAMPANJA) type is DECIMAL, precision is 10.
    <2448-4796-09/02/11 14:44:02>: Column 4 (DATUM_ZAD_TRAN) type is CHAR, precision is 8.
    <2448-4796-09/02/11 14:44:02>: Column 5 (DATUM_KAMP_VELJ) type is CHAR, precision is 8.
    <2448-4796-09/02/11 14:44:02>: Column 6 (ST_ZNESEK) type is DECIMAL, precision is 15.
    <2448-4796-09/02/11 14:44:02>: Column 7 (ST_OBISK) type is SMALLINT, precision is 5.
    <2448-4796-09/02/11 14:44:02>: Column 8 (PCNT) type is INTEGER, precision is 10.
    <2448-4796-09/02/11 14:44:02>: The insert statement to be executed is:
    <2448-4796-09/02/11 14:44:02>: INSERT INTO DBU01.T731KART_RFM VALUES (?,?,?,?,?,?,?,?)
    <2448-4796-09/02/11 14:44:02>: INSERT INTO DBU01.T731KART_RFM VALUES (?,?,?,?,?,?,?,?)
    <2448-4796-09/02/11 14:44:02>: Driver version is : 03. Version 1 flag set to 0.
    <2448-4796-09/02/11 14:44:02>: Error in SQLExecute
    Message: IBMCLI Driver CLI0112E Error in assignment. SQLSTATE=22005
    SQL State: 22005
    <2448-4796-09/02/11 14:44:02>: The following values were being inserted:
    <2448-4796-09/02/11 14:44:02>: Column 1 XLS : 62
    <2448-4796-09/02/11 14:44:02>: Column 2 ZAP_ST : 1
    <2448-4796-09/02/11 14:44:02>: Column 3 KAMPANJA : 5
    <2448-4796-09/02/11 14:44:02>: Column 4 DATUM_ZAD_TRAN : 18042008
    <2448-4796-09/02/11 14:44:02>: Column 5 DATUM_KAMP_VELJ : 30042008
    <2448-4796-09/02/11 14:44:02>: Column 6 ST_ZNESEK : 25
    <2448-4796-09/02/11 14:44:02>: Column 7 ST_OBISK : 1
    <2448-4796-09/02/11 14:44:02>: Column 8 PCNT : ##########
    <2448-4796-09/02/11 14:44:02>: Failed to insert a row (rc = -1009).
    <2448-4796-09/02/11 14:44:02>: Failed after 0 rows inserted.
    <2448-4796-09/02/11 14:44:02>: Database load complete.
    <2448-4796-09/02/11 14:44:06>: Returned status: (-1009) Failed_to_execute_the_SQL_statement
    <2448-316-09/02/11 15:17:27>: Cleaning up and closing the transaction...
    <2448-316-09/02/11 15:17:27>: Transaction rollback succeeded.

    I've tried Windows (ODBC) adapter and I get the upper error all the time... even NULL didn't get written.
    Then I've tried DB2 zOS (ODBC) adapter and I at least get NULL, but this is useless as 0 is a valid value for the
    row.

    Anybody knows how to fix this?

    A big thanks in advance.

    Best regards
    Waldemar
    #IBM-Websphere-Transformation-Extender
    #DataExchange
    #IBMSterlingTransformationExtender


  • 2.  Re: Can't write zero (0) to DB2 whatever I do.

    Posted 09/02/11 10:21 AM

    Originally posted by: WaldemarHaszlakiewicz


    As Murphy said... you will answer your question only after you ask somebody else.

    So I've found another bug in WTX.

    When defining database TypeTrees I've selected fixed length and I had a lot of trouble.
    Now I've selected delimited and left everything at default and everything worked properly.

    So IBM guys can you please report this bug.

    Thanks.

    Best regards
    Waldemar
    #DataExchange
    #IBMSterlingTransformationExtender
    #IBM-Websphere-Transformation-Extender