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
Expand all | Collapse all

Converting Scientific Notation

  • 1.  Converting Scientific Notation

    Posted Wed December 11, 2002 06:35 PM

    Is there a built in way to convert a number in scientific notation into a regular number.

    For example,

    4.90E+12

    should convert to

    4901780000000.00

    Any ideas???


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


  • 2.  RE: Converting Scientific Notation

    Posted Wed December 11, 2002 07:41 PM

    Converting 4.90E+12 will result in 4900000000000, not 4901780000000.00. What is the source of this number? You may need to take steps to retrieve the number in a particular format that retains accuracy.


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


  • 3.  RE: Converting Scientific Notation

    Posted Wed December 11, 2002 08:27 PM

    Yeah I just realized that we’ll need to get some better data from our partner if they want us to transform it into the exact number. Thanks.


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


  • 4.  RE: Converting Scientific Notation

    Posted Fri August 03, 2007 09:06 PM

    Hi Reamon,
    I have the same problem. Although the EAI retrieves well-formated amount from Oracle Application(check out snapshots), its format turns into scientific notation. I didn’t find any webMethods built-in service that makes conversion to a regular format. Any ideas?

    file://C:/snapshots.rar


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


  • 5.  RE: Converting Scientific Notation

    Posted Fri August 03, 2007 11:45 PM

    Where exactly are you seeing the scientific notation? If you’re doing EDI conversions then you’re seeing it because of the EDI formatting routines used by convertToString. The formatting can be disabled by editing the the settings for formatDecimal. In Administrator, select EDI then Configure Field Formats. Set isEnabled or applyFormat to false.

    If you’re seeing the notation in some other context, please provide the details.


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


  • 6.  RE: Converting Scientific Notation

    Posted Mon August 06, 2007 11:33 AM

    Hi Reamon,
    On the whole, there are 2 packages. The 1st one retrieves an Oracle Application document then, data is mapped to an XML document. The XML document(ME029FromBO) is published to the broker with correct amount values (AmountsFromBO.png). The 2nd package’s trigger is launched once the XML document is published and so, the 2nd package’s service is executed. I put a savePipelineToFile and a restorePipelineFromFile at the top of the 2nd package’s service code to check data’s values that comes from the 1st package(outPutPipeline.png). Is there any settings to disable somewhere in this case?


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


  • 7.  RE: Converting Scientific Notation

    Posted Mon August 06, 2007 05:35 PM

    Pasting a link into a post isn’t the way to attach a file within the forums. I cannot see your screen shots.

    XML documents cannot be directly published to the Broker. Only IS document types can be. If the IS doc type being published is using float or double for one of more of the fields, consider changing them to use the string type. Typically, float/double is to be avoided.


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


  • 8.  RE: Converting Scientific Notation

    Posted Tue August 07, 2007 12:20 PM

    I don’t know how to send you the attached file. Can you give an MSN address or a Skype address?


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


  • 9.  RE: Converting Scientific Notation

    Posted Tue August 07, 2007 01:42 PM

    Click on the “Go Advanced” button. There you’ll see information about adding attachments to a post.


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


  • 10.  RE: Converting Scientific Notation

    Posted Tue August 07, 2007 07:09 PM

    I can’t upload the attachement file cause of its dimension. I tried to copy/paste snapshots into a word file but its size is too big…I tried to zip
    the attachement file but apparently, uploading a rar file is not allowed !!!

    I think that u should send me your e-mail address :wink:


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


  • 11.  RE: Converting Scientific Notation

    Posted Tue August 07, 2007 07:56 PM

    RAR archives often contain viruses or malware. Use a simple image editing tool to resize your images to make them smaller and then attach them as JPG’, PNG’s or GIF’s. PaintBrush will do this or the slightly more capable (and free) Paint.Net.

    Mark


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


  • 12.  RE: Converting Scientific Notation

    Posted Wed August 08, 2007 01:07 PM

    I sent you in the attachment amounts values that comes from OA and amount values that goes to the target system via pipeline files. Btw, the IS document type is created from an xsd. In the IS document type that I use and for each field, there are 2 parameters in a field’s property that defines field’s type (type and content type). In my case:
    type= String
    content type = float{XML Schema}
    Input_Pipeline_File.doc (54 KB)
    Output_Pipeline_File.doc (39 KB)


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


  • 13.  RE: Converting Scientific Notation

    Posted Wed August 08, 2007 01:34 PM

    The use of the float type explains why exponential notation is used. That is a perfectly legal and valid representation. [URL=“XML Schema Part 2: Datatypes Second Edition”]XML Schema Part 2: Datatypes Second Edition

    The question then arises on whether or not float is a good type for these fields. If these values represent money values, float is the wrong type to use. Decimal would be a better type to use. [URL=“XML Schema Part 2: Datatypes Second Edition”]XML Schema Part 2: Datatypes Second Edition

    I usually use string types for all fields, to avoid such representation and conversion issues. This is useful in the vast majority of the cases where the data is simply passed through without manipulation. If manipulation is needed (e.g. summing money amounts) then I convert the strings such that accuracy is preserved–use of float and double data types do not preserve accuracy. This article covers the issues.


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


  • 14.  RE: Converting Scientific Notation

    Posted Wed August 22, 2007 05:21 PM

    I assigned an empty value to the parameter “content type” (instead of “float{XML Schema}”) and it works. I may need you for another issue, thx a lot Reamon ;)!


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