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 » integer representation CWF format

Post new topic  Reply to topic
 integer representation CWF format « View previous topic :: View next topic » 
Author Message
SpitFire
PostPosted: Tue Jan 17, 2006 6:16 am    Post subject: integer representation CWF format Reply with quote

Acolyte

Joined: 01 Aug 2005
Posts: 59
Location: India

Hi all,
I have a small mapping in my flow that converts a message set from TDS to CWF. The transformation of wire formats is occurring perfectly except for a numeric field in the input message. The message structure is as follows:

----------------------------------------------------------------------------
emp
- empid ==> (xsd:int; length: 4)
- empname ==> (xsd:string; length: 5)
----------------------------------------------------------------------------

Now when I try to transform the wire format of the incoming message from TDS to CWF, the transformation occurs perfectly, but at the output message the integer value is garbled. In the flow debug mode, I am able to see the exact integer value (whatever provided at the input), however, when the message is picked up from the queue, the number is garbled. It appears as if I tried to send a set of characters in an unintelligible form.
Can someone help me resolve the issue?
_________________
...: 5|71+ph1|23 :...
Back to top
View user's profile Send private message
kimbert
PostPosted: Tue Jan 17, 2006 8:46 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Go to the CWF properties of the integer element. Look at the property 'Physical Type'. If it is set to 'Integer' then what you are seeing is probably correct - it is the twos-complement binary representation of the integer. If you want the number in one of the more human-readable 'external decimal' or 'packed decimal' forms, change the physical type. But make sure you understand what you're doing first.
.
Back to top
View user's profile Send private message
SpitFire
PostPosted: Tue Jan 17, 2006 11:21 pm    Post subject: External Decimal Reply with quote

Acolyte

Joined: 01 Aug 2005
Posts: 59
Location: India

Hi Kimbert,
Thanks for the tip. In my flows though the message in the output had the integer represented in the unintelligible form, when I read the message in a java/c program and tried to convert the bytes into an integer, the value was perfectly equal to that of the input. Basically, I guess it has to do something with the CCSID. I guess somehow MQ when it reads the integer from the CWF formatted output, doesn't understand how to represent the 4 byte integer.
Also, if I use "external decimal", everything is perfectly OK. I mean, the number appears at the output in the proper form.
I came across this information in the IBM Redbooks and quoting the same here for sake of others who tread my path -


-----------------------------------------------------------------------------------------
The representation of numeric elements can be affected by the Encoding and CodedCharSetId attributes that are set for the WebSphere MQ queue manager:
- Elements that have Physical Type set to Integer and Packed Decimal are represented in the appropriate WebSphere MQ Encoding value.
- Elements that have Physical Type set to External Decimal are represented in the WebSphere MQ CodedCharSetId value.

-----------------------------------------------------------------------------------------

_________________
...: 5|71+ph1|23 :...
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 » integer representation CWF format
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.