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 » problem in decimal representation in output queue

Post new topic  Reply to topic
 problem in decimal representation in output queue « View previous topic :: View next topic » 
Author Message
datspats
PostPosted: Wed Jul 04, 2007 4:48 am    Post subject: problem in decimal representation in output queue Reply with quote

Voyager

Joined: 12 Apr 2007
Posts: 80
Location: Mumbai

Hello all,

I am trying to write to message to a queue with decimal field in the format as below
e.g.
435.54 is mapped to the format 6.3- ie. this should be written to the queue as "000435.540 " i.e 6 digits before decimal point and 3 digits after the decimal point.
and when -435.54 is mapped to the format 6.3- ie. this should be written to the queue as "000435.540-"

My message set has decimal field defined as,
I am defining length as 11 = (9 for digits + 1 for '.' + 1 for "-" (sign of number)).
I am defining padding character as '0'.

When message is written to the queue, I am getting number not expected in above format, Could you please help me on this? Where i am going wrong in defining message set.

Regards
Back to top
View user's profile Send private message Yahoo Messenger
datspats
PostPosted: Wed Jul 04, 2007 5:58 am    Post subject: Reply with quote

Voyager

Joined: 12 Apr 2007
Posts: 80
Location: Mumbai

Is there any way to achive this please?

Regards
Back to top
View user's profile Send private message Yahoo Messenger
kimbert
PostPosted: Wed Jul 04, 2007 12:32 pm    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Quote:
Where i am going wrong in defining message set
First tell us which domain ( probably MRM, but you did not say ) and which physical format you are using.
Quote:
I am getting number not expected in above format
So what are you getting? It's not easy to help unless you supply the facts.

What does the documentation say about this? Do you think it should be possible?
Back to top
View user's profile Send private message
datspats
PostPosted: Wed Jul 04, 2007 9:06 pm    Post subject: Reply with quote

Voyager

Joined: 12 Apr 2007
Posts: 80
Location: Mumbai

Yes the domain is MRM, the physical format TDS for the message set

What i trying to have field in output message is fixed length decimal value.

Which has the above format as mentioned in my first post.
Back to top
View user's profile Send private message Yahoo Messenger
jefflowrey
PostPosted: Thu Jul 05, 2007 2:24 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

kimbert wrote:
So what are you getting? It's not easy to help unless you supply the facts.

What does the documentation say about this? Do you think it should be possible?

_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
datspats
PostPosted: Thu Jul 05, 2007 6:40 am    Post subject: Reply with quote

Voyager

Joined: 12 Apr 2007
Posts: 80
Location: Mumbai

When I am trying to map 435.54 to the format 6.3-
I am getting in output as
000043554
Back to top
View user's profile Send private message Yahoo Messenger
kimbert
PostPosted: Thu Jul 05, 2007 6:58 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Please list the relevant TDS properties in your message definition
Back to top
View user's profile Send private message
datspats
PostPosted: Thu Jul 05, 2007 9:56 pm    Post subject: Reply with quote

Voyager

Joined: 12 Apr 2007
Posts: 80
Location: Mumbai

Hi Message set details
Message format: TDS

Complex type
-field1
-field2
-field3
-field4
All the fields are fixed length, they can be string, decimal, int

For the decimal I have set the property as
Length 11
Padding character '0'
and Trailing Sign character
poitive=<no value>
negative= -
Justfication: Right
Precision selected : All significant digits

So I expect the output for value 435.54 as "000435.540 "
and for -435.54 as "000435.540-"
Thats why I said my format would be "6.3-" Number
i.e. 6 character before decimal, 1 for decimal point, 3 for after decimal and finally 1 for sign symbol '-' if negative value.

I think this is clear what i want to do.

Regards
Back to top
View user's profile Send private message Yahoo Messenger
kimbert
PostPosted: Fri Jul 06, 2007 2:16 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Quote:
I am getting in output as
000043554
That number has no decimal separator. The docs say that you will always get a decimal separator if you set Precision to 'All significant digits'. So I see 3 possibilities:
a) there's a defect in the product
b) the value in the message tree is not what you thought it was
c) you did not set Precision to All Significant Digits

Two questions:
- Why have you set Precision to 'All Significant Digits'? Why not '3'.
- Have you checked the contents of your decimal element in the message tree ( using a Trace node or the debugger )?
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 » problem in decimal representation in output queue
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.