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.  Double type problem!

    Posted Thu April 25, 2002 08:49 AM

    Hello, I just encouter a probme to sum() or avg() the number which is double or float .


    {
    for $m in document(“data/Admission.xml”)/Admission/Applicants/Applicant//UnderGPA
    let $c := sum($m)
    return

    {$c}

    }


    if the tag has data type double like , 3.5 or 3.6. , the Quip will has the error below :

    <quip:SystemError xmlns:quip=“http://namespaces.softwareag.com/tamino/quip/”>
    quip:queryFile
    C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\Query20666.tmp
    </quip:queryFile>
    quip:message

    </quip:message>
    </quip:SystemError>
    If the Grade contains only integer , then this query would be fine.

    Deos that mean Quip does not support float type ???

    Thank you .


    #Tamino
    #webMethods
    #API-Management


  • 2.  RE: Double type problem!

    Posted Mon April 29, 2002 12:43 PM

    generally the functions avg,sum,min,max work perfectly with floating numbers, e.g:

    avg((294e-10,0,78e10,2.5,9,0,1.23))

    works fine. The problem is something else.
    In the example above float literals are used.
    The values you have in your application
    are actually unparsed character
    data, which unfortunately the Quip
    implementation tries to parse as integer values
    for these functions. So you would need to
    convert these character data into floats
    explicitly (note you do not have any schema
    information right now in quip). Unfortunately,
    constructors for creating floats from Strings are
    missing in the set of built-in functions in quip.

    Thank you for noticing this. It will be fixed in
    the next quip release, which will be out by end of
    May.

    Sven Eric


    #webMethods
    #API-Management
    #Tamino