|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
EBCDIC to ASCII MQGMO_CONVERT |
« View previous topic :: View next topic » |
Author |
Message
|
Sam12345 |
Posted: Wed Sep 17, 2003 4:54 am Post subject: EBCDIC to ASCII MQGMO_CONVERT |
|
|
Novice
Joined: 11 Sep 2003 Posts: 15
|
I am trying to MQGET a message deposited by a mainframe in EBCDIC. But the convert fails and I am picking up an untranslated message.
My MQGET options are as follows:
my $GetMsgOpts = {
Options => MQGMO_FAIL_IF_QUIESCING | MQGMO_SYNCPOINT | MQGMO_WAIT,
MQGMO_ACCEPT_TRUNCATED_MSG => 64,
MQGMO_CONVERT => 16384,
WaitInterval => 600,
};
According to the IBM manual, the MQGMO_CONVERT translates based on the CodedCharSetId and Encoding on the MsgDesc. But I cannot find what they should be set to... Or am I misreading the document?
Any help greatly appreciated for this MQ newby.... |
|
Back to top |
|
 |
EddieA |
Posted: Wed Sep 17, 2003 6:13 am Post subject: |
|
|
 Jedi
Joined: 28 Jun 2001 Posts: 2453 Location: Los Angeles
|
The CCSID and Encoding 'should' be set correctly at the sending side. If you can display the message with the MQExpoder or amqsbcg you can see what the values are.
Do you get any errors in the log when you GET the message.
What is the MQMD.FORMAT of the message. If it isn't one recognised by MQSeries, then you need to have a conversion exit. If the data is all character, then it should be set to MQSTR.
Lastly, I don't recognise the language you are using. Are you certain that you are correctly ORing all the GMO options.
Cheers, _________________ Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0 |
|
Back to top |
|
 |
Sam12345 |
Posted: Wed Sep 17, 2003 6:34 am Post subject: |
|
|
Novice
Joined: 11 Sep 2003 Posts: 15
|
The language is Perl. The general syntax seems correct because I can exchange MQ messages with several systems. This, however, is the first mainframe one.
The format, when I leave the message for them, is MQFMT_STRING. The mainframe picks it up correctly. So it is their response that I am unable to translate with the MQGET.
You are saying that the CCSID and Encoding are supposed to be set by the mainframe program when they deliver my message? And I am supposed to set my MQGMO_CONVERT to match their values?
There are no errors in AMQERR01.LOG
Probably because the message is being picked up, its just that since its not translated, it looks like binary to me.
I do not use MQExpoder or amqsbcg, should I be using them? Where are they? My MQ resources now are limited because this is all new to us.
Thanks for your time. |
|
Back to top |
|
 |
EddieA |
Posted: Wed Sep 17, 2003 8:37 am Post subject: |
|
|
 Jedi
Joined: 28 Jun 2001 Posts: 2453 Location: Los Angeles
|
Taking your points in order. (And I'm assuming that you are running on a platform that uses ASCII):
Just because you can exchange messages between other systems does not necessarily mean that the GMO options are correct. If all the other systems are using flavours of ASCII, then you might not notice if a convert did not happen. Do you know which characters have different hex values between Windows, AIX, and SUN. I know I don't.
If you are sending a message with MQFMT_STRING and the mainframe picks it up, then they are doing the GET with CONVERT correctly. However, that does not mean that they are correctly setting MQFMT_STRING when they send the reply.
The mainframe should be setting these. Unless you want to do something really wierd, you don't have to code a setting. The defaults work.
Unless you can read the hex values of characters for ASCII and ECBDIC, then it will look like binary.
MQExplorer is the GUI provided with the Windows version of MQ. amqsbcg is one of the sample programs supplied with nearly all the versions of MQ. It can be used to browse a queue and will give a listing of the values in the MQMD for each message. My suggestion would be to use one of these to look at the reply message from the mainframe to verify whats in CCSID, Encoding, and Format.
Cheers, _________________ Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0 |
|
Back to top |
|
 |
GMcCarthy |
Posted: Wed Sep 17, 2003 10:13 am Post subject: |
|
|
 Centurion
Joined: 06 Nov 2001 Posts: 113 Location: Melville NY
|
Are they sending you back MQFMT_STRING ? _________________ Regards,
Gina
IBM Certified MQSeries Specialist |
|
Back to top |
|
 |
Sam12345 |
Posted: Thu Sep 18, 2003 11:29 am Post subject: |
|
|
Novice
Joined: 11 Sep 2003 Posts: 15
|
Thank you all for your time. |
|
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
|
|
|
|