Author |
Message
|
ramesh.govindaswamy |
Posted: Wed Nov 01, 2006 11:25 pm Post subject: EBCDIC to ACSII Conversion |
|
|
Apprentice
Joined: 25 Oct 2005 Posts: 42
|
Hi,
I am facing some problem while converting the message from EBCDIC to ASCII format.My queue manager CCSID is 819. I am sending the message to the queue manager with ASCII format with the message level characterset as 819.while getting the reply ,the host application will send the response message in the format of EBCDIC and the characterset for the message is 37.
I have specified the MQC.GMO_CONVERT in my get message options, but still I can't able to convert the message into ASCII while getting the message from the queue.I am doing the readString and the writeSting method for reading the writing the message on the queue respectively.
Could you please any one suggest me where I am doing the mistake and do I need to change anything in the ccsid.tbl for the conversion.
Please help me on this.
With regards
Ramesh.G |
|
Back to top |
|
 |
Mr Butcher |
Posted: Thu Nov 02, 2006 12:56 am Post subject: |
|
|
 Padawan
Joined: 23 May 2005 Posts: 1716
|
what is the format of the message (the mqmd format in the message header)? Mq will only convert if the format is set properly. _________________ Regards, Butcher |
|
Back to top |
|
 |
Vitor |
Posted: Thu Nov 02, 2006 1:04 am Post subject: Re: EBCDIC to ACSII Conversion |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
ramesh.govindaswamy wrote: |
Hi,
do I need to change anything in the ccsid.tbl for the conversion.
|
I'd doubt it. IIRC that's one of the standard conversions.
It's quite rare in my expereince to need to fiddle with ccsid.tbl. And not something to be attempted lightly.
I'd investigate the message format as previously suggested first. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
ramesh.govindaswamy |
Posted: Thu Nov 02, 2006 1:15 am Post subject: |
|
|
Apprentice
Joined: 25 Oct 2005 Posts: 42
|
Hi,
I have set the message format type as string.
MQMessage lvMQMessage = new MQMessage();
lvMQMessage.format = MQC.MQFMT_STRING
I have not set any Encoding in the message.Please suggest me. |
|
Back to top |
|
 |
Vitor |
Posted: Thu Nov 02, 2006 1:31 am Post subject: Re: EBCDIC to ACSII Conversion |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
ramesh.govindaswamy wrote: |
.My queue manager CCSID is 819. I am sending the message to the queue manager with ASCII format with the message level characterset as 819.while getting the reply ,the host application will send the response message in the format of EBCDIC and the characterset for the message is 37.
|
So EBCDIC application is doing a get with convert & this works properly because it's able to interpret the message? It then generates a reply, sends it back to ASCII application which does a get with convert that fails? And you're certain that because you've sent the request message with a Format of MQFMT_STRING the other application honours that & the reply message has the same Format? With the CCSID set to match the EBCDIC contents?
If that's all correct & you're certain, are both applications on their own queue manager or is one cliented onto the other? _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
fjb_saper |
Posted: Thu Nov 02, 2006 3:53 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
ramesh.govindaswamy wrote: |
Hi,
I have set the message format type as string.
MQMessage lvMQMessage = new MQMessage();
lvMQMessage.format = MQC.MQFMT_STRING
I have not set any Encoding in the message.Please suggest me. |
I have seen strange things happening on a JMS Client if the MQ_ENCODING is not set right on the message. Either set it to 0 (should default to the qmgr) or set it to the right value for the platform, or use one of the valid "literal" values. Just because it will accept any integer does not mean that the content will not cause a problem further down the road.
Even stranger things: If the encoding is not set right, using a JMS client on a machine with the MQ client only gives you an exception stating the encoding is not right...; using JMS Client on a machine with the MQ Server & client installed will give you the message ??? (V6.0.1.0) and the message was a javax.jms.TextMessage....
Enjoy  _________________ MQ & Broker admin |
|
Back to top |
|
 |
ramesh.govindaswamy |
Posted: Thu Nov 02, 2006 4:06 am Post subject: |
|
|
Apprentice
Joined: 25 Oct 2005 Posts: 42
|
Hi,
I did a small change in my QueueManager CCSID.I changed the CCSID from 819 to 1208.While connecting the QueueManager I am setting the MQEnvironment.CCSID as 1208 and while sending and receving the message I am setting the message level characterSetId as 1208.
The host application is able to read the message from the queue, while sending the response message(EBCDIC format) they are setting the message level characterSetId as 37.
In both the side the message format and the encoding are MQC.MQFMT_STRING, MQC.MQENC_NATIVE respectively.
While reading the response message I am getting "java.io.EOFException".I am using the MQ version of 5.3 with the CSD level of 01.I have specified the MQC.MQGMO_CONVERT option in the get message option.
Please let me know how can I over come the EOF exception. |
|
Back to top |
|
 |
fjb_saper |
Posted: Thu Nov 02, 2006 4:12 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
5.3 CSD 01 ?? Get the latest CSD ASAP. You should be @ CSD 12 or above... _________________ MQ & Broker admin |
|
Back to top |
|
 |
ramesh.govindaswamy |
Posted: Thu Nov 02, 2006 4:21 am Post subject: |
|
|
Apprentice
Joined: 25 Oct 2005 Posts: 42
|
Saper,
Could you please check whether the way I am approaching(Conversion from EBCDIC to ASCII) correct or not.In the mean time I will update my CSD level. |
|
Back to top |
|
 |
Vitor |
Posted: Thu Nov 02, 2006 4:29 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
ramesh.govindaswamy wrote: |
While reading the response message I am getting "java.io.EOFException".I am using the MQ version of 5.3 with the CSD level of 01....Please let me know how can I over come the EOF exception. |
Upgrade the CSD level!
Levels below 5.3.10 are notoriously flaky in their Java support. I'd upgrade and retry before you look at your code again (which does appear correct at face value) _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
|