|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
EBCDIC HEX value on MQ Server |
« View previous topic :: View next topic » |
Author |
Message
|
Vinodh |
Posted: Sun Aug 14, 2011 11:57 pm Post subject: EBCDIC HEX value on MQ Server |
|
|
Newbie
Joined: 14 Aug 2011 Posts: 1
|
Hi,
In our application, consumer is in Java platform. Provider is on mainframe. We are using OTMA/IMS bridge. In Java, we are converting the data to EBCDIC using "Cp1047". We are sending the message as a bytes array. For testing, we are printing the byte array converted to Hex string and it looks below.
EBCDII HEX value of the string 'IIH ' is C9C9 C840.
But, when the message reaches the queue, it appears as 'C389 C389 C388 40'.
Is it due to any queue or queue manager configuration? Any thoughts. |
|
Back to top |
|
 |
zpat |
Posted: Mon Aug 15, 2011 12:21 am Post subject: |
|
|
 Jedi Council
Joined: 19 May 2001 Posts: 5866 Location: UK
|
Why don't you let WMQ convert the data?
It is not best practice to send data in the receivers codepage. It is best practice to send it in the standard code page of the producer and let the consumer convert it (using MQGMO_CONVERT on the MQGET call).
MQ does not convert data on MQPUT. It simply stores what you supply - but you MUST set the correct CCSID in the MQMD to match the data that you have supplied.
When you display the queue - watch out for the tool that you use to display the message data - it may be trying to convert it before you see it. Try browsing it using MO71 and select the message conversion option off (right button context menu) |
|
Back to top |
|
 |
cicsprog |
Posted: Mon Aug 15, 2011 10:43 am Post subject: |
|
|
Partisan
Joined: 27 Jan 2002 Posts: 347
|
|
Back to top |
|
 |
zpat |
Posted: Mon Aug 15, 2011 10:54 am Post subject: |
|
|
 Jedi Council
Joined: 19 May 2001 Posts: 5866 Location: UK
|
The IMS bridge may be an unusual case though.
I can't say I have ever used it but it may be necessary to supply the message in a very specific format with the MQMD and data set up in a particular way.
In fact the documentation is a masterpiece of IBM speak. Even after decades of working with IBM system software, I am not entirely sure whether this means the message is converted for you or not, but I think it is.
Quote: |
Data conversion
The data conversion (including calling any necessary exits) is performed by the distributed queuing facility when it puts a message to a destination queue that has XCF information defined for its storage class. Any exits needed must be available to the distributed queuing facility in the data set referenced by the CSQXLIB DD statement. This means that you can send messages to an IMSâ„¢ application using the WebSphere MQ-IMS bridge from any WebSphere MQ platform.
Note: Because the WebSphere MQ-IMS bridge does not convert messages when it gets a message, messages arriving through the CICS® distributed queuing facility are not converted.
If there are conversion errors, the message is put to the queue unconverted; this results eventually in it being treated as an error by the WebSphere MQ-IMS bridge, because the bridge cannot recognize the header format. If a conversion error occurs, an error message is sent to the z/OS console. |
Last edited by zpat on Mon Aug 15, 2011 11:51 am; edited 2 times in total |
|
Back to top |
|
 |
cicsprog |
Posted: Mon Aug 15, 2011 11:03 am Post subject: |
|
|
Partisan
Joined: 27 Jan 2002 Posts: 347
|
|
Back to top |
|
 |
rekarm01 |
Posted: Sun Aug 21, 2011 9:41 am Post subject: Re: EBCDIC HEX value on MQ Server |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 1415
|
Vinodh wrote: |
We are using ... we are converting ... We are sending ... we are printing ... |
"We" is not very descriptive. Be more specific when describing the problem. At each step, identify any relevant information about the message and its headers, which component is currently acting on the message, what it's doing, what the actual result is, and how this might differ from the expected result.
Vinodh wrote: |
EBCDII HEX value of the string 'IIH ' is C9C9 C840.
But, when the message reaches the queue, it appears as 'C389 C389 C388 40'. |
It looks like some unidentified component is incorrectly converting the EBCDIC value from "ASCII" to Unicode (or, more accurately, converting EBCDIC from "ISO 8859-x" to Unicode).
If this unidentified component should be converting the value at all, the "from" encoding (source ccsid) needs to match the current encoding of the data. |
|
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
|
|
|
|