|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
How to handle FLOAT |
« View previous topic :: View next topic » |
Author |
Message
|
DELLIPIZ |
Posted: Fri Jan 14, 2005 1:07 pm Post subject: How to handle FLOAT |
|
|
Acolyte
Joined: 08 Oct 2003 Posts: 70
|
Hi,
I am converting MRM to XML.
In the MRM, I have a FLOAT field. On the CWF tag, I have the following attributes:
Physical Type: PACKED_DECIMAL
Length Count: 8
Length Units: Bytes
Signed: Yes
Virtual Decimal Point: 2
However, when it converts to XML, it is giving me the following:
<oa:Amount>4000</oa:Amount>
How can I get it to give me???
<oa:Amount>4000.00</oa:Amount>
It seems to work when I have significant numbers after the decimal, but if it is 00 after the decimal, it seems to drop them.
So in this example, it works for one number by not for another.
<oa:Amount currency="USD" type="NetPurPrice" basis="ListPrice" discount="12.99">4000</oa:Amount>
Any suggestions of how I can get it to keep the '.00'. Thanks!
-Lori |
|
Back to top |
|
 |
kirani |
Posted: Sat Jan 15, 2005 12:10 am Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
Do a CAST as DECIMAL with (8,2). _________________ Kiran
IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries
|
|
Back to top |
|
 |
DELLIPIZ |
Posted: Sun Jan 16, 2005 6:22 pm Post subject: |
|
|
Acolyte
Joined: 08 Oct 2003 Posts: 70
|
Hi,
When I try doing cast as decimal(3,2) for a FLOAT field defined as:
FLOAT field. On the CWF tag, I have the following attributes:
Physical Type: PACKED_DECIMAL
Length Count: 2
Length Units: Bytes
Signed: Yes
Virtual Decimal Point: 2
I get the following error:
REASONCODE>2593</REASONCODE><SEVERITY>E</SEVERITY><DESCRIPTN>Cannot convert float '%1' to an exact numeric with precision '%2' and scale '%3'. It is outside the valid range of numbers.</DESCRIPTN><DETAIL><INSERTS>1=1.309000e+03, 2=3, 3=2</INSERTS><LABEL>ICFS_QUOTEINFO_RESP.SubLine Logic</LABEL><NAME>23566772-0101-0000-0080-88d1dfd825c1<
Any suggestions?
Thanks!
-Lori |
|
Back to top |
|
 |
kirani |
Posted: Mon Jan 17, 2005 12:03 am Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
What is your PIC clause for this element? I think it's PIC 9V9(2) COMP-3?
What is your incoming value for this field? _________________ Kiran
IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries
|
|
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
|
|
|
|