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 » DECIMAL places

Post new topic  Reply to topic
 DECIMAL places « View previous topic :: View next topic » 
Author Message
shogan2003
PostPosted: Mon Jan 26, 2004 11:49 am    Post subject: DECIMAL places Reply with quote

Centurion

Joined: 03 Jul 2003
Posts: 133
Location: London

I'm not getting 2 decimal places when mapping to a message set element declared to be of type DECIMAL. the output is XML


The msgset was generated using the XSD import support pac

I am using WMQI 2.1

Is this a known bug or is some further adjustment required to the msg set ?

Thanks in advance
Back to top
View user's profile Send private message Send e-mail
kirani
PostPosted: Mon Jan 26, 2004 11:54 am    Post subject: Reply with quote

Jedi Knight

Joined: 05 Sep 2001
Posts: 3779
Location: Torrance, CA, USA

It would be helpful if you could provide more information on this, like your current input data and expected output data, properties of MRM elements in question.
_________________
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
shogan2003
PostPosted: Tue Jan 27, 2004 3:17 am    Post subject: Reply with quote

Centurion

Joined: 03 Jul 2003
Posts: 133
Location: London

Well the field is DECIMAL and I haven't added a CWF layer.

If a field is DECIMAL I might expect its default to be 2 decimal places.
Otherwise, can I use CWF to configure it for 2 decimal places ?

Thanks in advance
Back to top
View user's profile Send private message Send e-mail
kimbert
PostPosted: Tue Jan 27, 2004 4:59 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

So you want to output 2 decimal places in XML? If the value of 'decimalElement' in the tree is 123, you still want to output
Code:
<decimalElement>123.00</decimalElement>


Why do you ask about CWF? Is your input message being parsed as CWF?

Please answer the questions - we need to know the input format, the output format and any relevant settings on the element in question. Otherwise we're just guessing.
Back to top
View user's profile Send private message
wooda
PostPosted: Wed Jan 28, 2004 2:41 am    Post subject: Reply with quote

Master

Joined: 21 Nov 2003
Posts: 265
Location: UK

If you are inputing and outputing in MRMXML and you have modelled the field as a DECIMAL then you will not get insignificant decimal places. ie. 123 will always be output as 123 and not 123.00

Although in CWF and TDS you can control how many decimal places you get you cannot in XML it will output significant digits only.
Back to top
View user's profile Send private message
fschofer
PostPosted: Wed Jan 28, 2004 5:43 am    Post subject: Reply with quote

Knight

Joined: 02 Jul 2001
Posts: 524
Location: Mainz, Germany

One possible solution for your problem:

Define your XML elements as string and do your CASTs on your own.
Decimal elements seems always to be cut like zanda mentioned.

Code sample:

Code:
DECLARE TEST_DEC    DECIMAL;

SET TEST_DEC = 123.4;

SET "OutputRoot"."MRM"."test_string" = CAST(  (CAST( TEST_DEC AS DECIMAL(7,4) )) AS CHAR);
SET "OutputRoot"."MRM"."test_decimal" = CAST( TEST_DEC AS DECIMAL(7,4) );


Code:
<?xml version="1.0"?><!DOCTYPE MRM PUBLIC "DPQP2300C0001" "www.mrmnames.net/DPQP2300C0001">
<MRM xmlns="www.mrmnames.net/DPQP2300C0001">
<TEST_MSG>
<test_string>123.4000</test_string>
<test_decimal>123.4</test_decimal>
</TEST_MSG>
</MRM>
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » DECIMAL places
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.