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 » General IBM MQ Support » EBCDIC HEX value on MQ Server

Post new topic  Reply to topic
 EBCDIC HEX value on MQ Server « View previous topic :: View next topic » 
Author Message
Vinodh
PostPosted: Sun Aug 14, 2011 11:57 pm    Post subject: EBCDIC HEX value on MQ Server Reply with quote

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
View user's profile Send private message
zpat
PostPosted: Mon Aug 15, 2011 12:21 am    Post subject: Reply with quote

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
View user's profile Send private message
cicsprog
PostPosted: Mon Aug 15, 2011 10:43 am    Post subject: Reply with quote

Partisan

Joined: 27 Jan 2002
Posts: 347

zpat gave you an excellent answer. And, a google search of "mq ims bridge" provides a link to this

http://publib.boulder.ibm.com/infocenter/wmqv6/v6r0/index.jsp?topic=/com.ibm.mq.csqzal.doc/fg15870_.htm

which will give you answer to all your IMS Bridge and data conversion questions with these types of messages.
Back to top
View user's profile Send private message
zpat
PostPosted: Mon Aug 15, 2011 10:54 am    Post subject: Reply with quote

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
View user's profile Send private message
cicsprog
PostPosted: Mon Aug 15, 2011 11:03 am    Post subject: Reply with quote

Partisan

Joined: 27 Jan 2002
Posts: 347

conversion is noted here;

http://publib.boulder.ibm.com/infocenter/wmqv7/v7r0/index.jsp?topic=/com.ibm.mq.csqzal.doc/fg15980_.htm
Back to top
View user's profile Send private message
rekarm01
PostPosted: Sun Aug 21, 2011 9:41 am    Post subject: Re: EBCDIC HEX value on MQ Server Reply with quote

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
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 » General IBM MQ Support » EBCDIC HEX value on MQ Server
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.