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.  NLS Numeric Characters

    Posted Wed May 16, 2007 10:19 AM

    Hi all,

    I’m programming over webMethods 6.0.1.

    When i try to perform this arithmetic operation : 1,5 * 1,5 using this flow pub.math:multiplyFloats, it results 225.0.:eek:

    However I’m expecting this : 1,5 * 1,5 = 2,25 as i’m using French numeric characters.

    I had tried to do this to run my IS : server.bat -debug 4 -Duser.language=fr -Duser.country=FRA
    but it was in vain. I stil have : 1,5 * 1,5 = 225.0 :mad:

    Could anyone help? I’ll be grateful.


    #webMethods
    #Integration-Server-and-ESB
    #Flow-and-Java-services


  • 2.  RE: NLS Numeric Characters

    Posted Thu May 17, 2007 06:18 PM

    Well, i am not sure that this is the best solution, but you could put a mapping step before your multiply, and use the pub.string.replace (from the WmPublic package), and set the searchString to be ‘,’ and the replaceString to be ‘.’ (both without the quotes). Do this for each input and then when the multiply is done, do the reverse pub.stirng.replace to get it back into the format you want.

    A better solution would be to use the pub.string.numericFormat function, but it looks like it doesn’t provide access to the underlying Locale :frowning:

    !!
    -greg


    #Flow-and-Java-services
    #Integration-Server-and-ESB
    #webMethods


  • 3.  RE: NLS Numeric Characters

    Posted Thu May 17, 2007 06:49 PM

    According to the docs, the input strings must be in a locale-neutral format. From the service description for pub.math:addFloats:

    “For example, calling pub.math:addFloats in a German locale with the arguments 1,23 and 2,34 will result in the value 357, not 3.57 or 3,57.”


    #webMethods
    #Integration-Server-and-ESB
    #Flow-and-Java-services


  • 4.  RE: NLS Numeric Characters

    Posted Thu May 17, 2007 07:12 PM

    dunno… never tried working in a different locale.


    #Flow-and-Java-services
    #Integration-Server-and-ESB
    #webMethods


  • 5.  RE: NLS Numeric Characters

    Posted Thu May 17, 2007 07:45 PM

    Well, once in Belgium, but that was on ActiveWorks 4.1 long ago on a continent far far away…


    #Flow-and-Java-services
    #Integration-Server-and-ESB
    #webMethods