|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Fractions Truncated |
« View previous topic :: View next topic » |
Author |
Message
|
dthomps2 |
Posted: Mon Nov 21, 2005 6:56 am Post subject: Fractions Truncated |
|
|
Newbie
Joined: 24 May 2005 Posts: 7 Location: Harrisburg, PA
|
I am encountering a problem that I can not figure out and am hoping someone out there with more knowledge than I have can help out.
I have a message flow that takes data from a DB2 database and creates an XML document. The problem I am having is with decimal fields (dollar amounts) truncating non signifcant digits. Any zeros in the least significant digit (right of the decimal) is truncated.
DB2 amount XML Amount
100.00 100
100.50 100.5
100.55 100.55
The schema I am using was provided to us by the governing body for this process and seems to work fine for another user, but not me.
Checking the the schema, I can see where the Type for these fields has the Value Constraints Properties set to Fraction Digits 2, but it does not seem to make a difference. The Inclusive Constraints are set to Min 0, Max 999999999.99.
Some more info that may be relevant.
Msg Flow:
Input -> Compute -> Filter -> Subflow -> Output
The subflow is as follows:
Input -> ResetContentDescriptor -> Compute -> RestContentDescriptor -> Output
The purpose of the subflow is to add Line feeds at certain points in the XML document. The first Reset node sets the Domain to Blob, and the second one is Promoted to Flow where it assigns the proper outgoing Messageset.
The other user that I referenced above uses the same subflow logic and their flows do not truncate the digits.
I'm at a loss here and would appreciate any help available. I've been banging my head on my desk for a couple of days trying to figure this one out.
Thanks,
Dave |
|
Back to top |
|
 |
kimbert |
Posted: Mon Nov 21, 2005 8:43 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
First point is that the Value Constraints which you mentioned do not affect the writing of an XML message. They can control the validation of the message ( if validation is enabled ), but not its physical appearance. I think you'll have to
- model the field as xsd:string
- write some ESQL to CAST to the value from decimal to string and pad with zeroes where necessary.
Alternatively, make the receiving application more tolerant (but that may be impossible).
I don't even want to know why you care about linefeeds in your XML document...! |
|
Back to top |
|
 |
dthomps2 |
Posted: Mon Nov 21, 2005 8:54 am Post subject: |
|
|
Newbie
Joined: 24 May 2005 Posts: 7 Location: Harrisburg, PA
|
kimbert,
Thanks. I was assuming that the value constraints were relevant. That's what I get for assuming.
Yeah, you don't want to know. I didn't want to put in linefeeds either, but the governing body dictates it. They're new to XML. |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|