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 » How to handle FLOAT

Post new topic  Reply to topic
 How to handle FLOAT « View previous topic :: View next topic » 
Author Message
DELLIPIZ
PostPosted: Fri Jan 14, 2005 1:07 pm    Post subject: How to handle FLOAT Reply with quote

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
View user's profile Send private message
kirani
PostPosted: Sat Jan 15, 2005 12:10 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
DELLIPIZ
PostPosted: Sun Jan 16, 2005 6:22 pm    Post subject: Reply with quote

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 &apos;%1&apos; to an exact numeric with precision &apos;%2&apos; and scale &apos;%3&apos;. 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
View user's profile Send private message
kirani
PostPosted: Mon Jan 17, 2005 12:03 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » How to handle FLOAT
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.