IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
  • 1.  ConvertToString and decimal points

    Posted Mon June 30, 2014 01:26 PM

    We have a value, 00000054321 that we pass into a mapping from a flat file

    We use a number of transformers to clean up the data, but the last transformer (formatnumber) converts the value to 0.54321

    When we trace it through the mapping everything is fine until we pass it through the ConvertToString function.

    At this point the output becomes 0.

    If we set the value in the Flat file to be 0.54321 and do not use the last transformer (formatnumber), the correct value 0.54321 comes out from ConvertToString.

    I am sure that whatever we are doing it is something quite silly.

    Any suggestions? webMethods Developer 8.2

    Paul


    #webMethods
    #webMethods-General
    #Integration-Server-and-ESB


  • 2.  RE: ConvertToString and decimal points

    Posted Tue July 01, 2014 04:32 AM

    Hi,

    What is your input and expected output?

    Kindly share few examples. This can be fixed not a big issue at all :slight_smile:


    #webMethods
    #Integration-Server-and-ESB
    #webMethods-General


  • 3.  RE: ConvertToString and decimal points

    Posted Tue July 01, 2014 05:48 AM

    Hi Maheesh

    Thank you for getting back to me. The values are those given in the post.

    The input value from the flat file is 00000054321 and the expected output is 0.54321

    We have a transformer with the following settings:

    fornatpattern : 0.#####
    removedecimalforimplied : false
    addexplicitdecimal : true
    adddecimalmultiplier : 0.00001

    With these settings I get a 0.

    If I set addexplicitdecimal to false, I get 54321.

    If I create a flat file that contains 0.54321 instead of 00000054321 and do not formatnumber, I get 0.54321.

    Clearly convertToString is doing something, but I don’t know what. It must have something to do with how the original input value is being treated.

    Clearly I have a workaround as explained above, but that will cause me problems in other processes. Better to get this working.

    Thanks,

    Paul


    #webMethods-General
    #Integration-Server-and-ESB
    #webMethods


  • 4.  RE: ConvertToString and decimal points

    Posted Mon July 21, 2014 01:52 PM

    Paul,

    I suggest to use the format service for the field in the dictionary

    In this service you can implement the complete logic for transformation. In the convertToSTring service you give the corresponding schema.

    Its working when I tested. Let me know if any issues.

    /Naidu
    sde.jpg


    #Integration-Server-and-ESB
    #webMethods-General
    #webMethods