ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Double to Decimal conversion

Post new topic  Reply to topic
 Double to Decimal conversion « View previous topic :: View next topic » 
Author Message
Prasi
PostPosted: Wed Aug 03, 2011 10:18 am    Post subject: Double to Decimal conversion Reply with quote

Apprentice

Joined: 03 Aug 2011
Posts: 42

Hi,

I am facing problems when converting an exponent value like
99.9999999999E15(Double). The value is getting round off and sets as 100000000000. My message set has decimal as datatype.

I am using MB7.0.

Since this s an amount field, I dont want to get trimmed off.

Please help.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Wed Aug 03, 2011 11:34 am    Post subject: Re: Double to Decimal conversion Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

Prasi wrote:
Hi,

I am facing problems when converting an exponent value like
99.9999999999E15(Double). The value is getting round off and sets as 100000000000. My message set has decimal as datatype.

I am using MB7.0.

Since this s an amount field, I dont want to get trimmed off.

Please help.

Looking at the size of the number is that really 100 E 15 or is it (100 E15) -1 in which case most math will round it up...
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
rekarm01
PostPosted: Wed Aug 03, 2011 1:53 pm    Post subject: Re: Double to Decimal conversion Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 1415

Prasi wrote:
99.9999999999E15(Double)

Double? Which language is that? Where is the code that sets and converts the value?
Back to top
View user's profile Send private message
Prasi
PostPosted: Wed Aug 03, 2011 6:50 pm    Post subject: Double to Decimal conversion Reply with quote

Apprentice

Joined: 03 Aug 2011
Posts: 42

We are receiving the Double value from Host System (Finnacle) when we are trying to convert the value into Decimal using compute node in ESQL.

its round off the value as above.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Wed Aug 03, 2011 7:49 pm    Post subject: Re: Double to Decimal conversion Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

Prasi wrote:
We are receiving the Double value from Host System (Finnacle) when we are trying to convert the value into Decimal using compute node in ESQL.

its round off the value as above.


OK so what is the limit values for double and for a decimal?
How many bytes are used for the representation?

I figure we might have an order of grandeur thing here where due to the size 100E15 - 1 is rounded up to 100E15 because of the size of the number...

You realize we are talking about 100,000 trillion here right? Is this about the national debt ceiling?? I don't believe a $1.00 more or less will make any difference there....
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
Prasi
PostPosted: Wed Aug 03, 2011 8:57 pm    Post subject: Double to decimal conversion Reply with quote

Apprentice

Joined: 03 Aug 2011
Posts: 42

For double it is (16,4), For decimal we have just declared as xsd:decimal.But when we use XSLT we are getting proper value. With ESQL , its getting trimmed off.
Back to top
View user's profile Send private message
rekarm01
PostPosted: Thu Aug 04, 2011 3:30 am    Post subject: Re: Double to Decimal conversion Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 1415

Prasi wrote:
We are receiving the Double value from Host System (Finnacle) when we are trying to convert the value into Decimal using compute node in ESQL.

There are a few details missing. How does this Double value get from the Host System to the compute node in ESQL? What sort of rounding errors might it encounter along the way? What data type does this value have within the ESQL, before converting it to Decimal? Where is the code that converts this Double value to Decimal?
Back to top
View user's profile Send private message
kimbert
PostPosted: Thu Aug 04, 2011 8:23 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Quote:
There are a few details missing.
I agree. If you really want us to help, then please
- post the output of a Trace node showing the Double value *before* it is converted
- post the code that performs the conversions
- post the output of a Trace node *after* the conversion

Or post the user trace showing the execution of the CAST statement ( if you are using CAST - you have not yet told us how you are performing the conversion ).
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Double to Decimal conversion
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.