Author |
Message
|
john123 |
Posted: Fri Jul 07, 2006 6:35 am Post subject: Message encoding issue in Mainframe (from Java /Windows) |
|
|
Newbie
Joined: 07 Jul 2006 Posts: 3
|
We are facing difficulties in reading messages in Mainframe. The messages are available in the mainframe queue but their format is listed in junk characters. The text messages are dropped in directly from Java/JMS application into the mainframe Queue. Please find more details below:
Server Environment: Java client is used. The WebSphere MQ 5.3 is installed in mainframe machine.
Issue: We are storing the message into mainframe Queue via JAVA. Java standalone program is able store the data and retrieve the data from Mainframe MQ. Also Java program is able to read the data from the queue which was put by mainframe. But the issue is that Mainframe could not recognize the format for the text message which was put by Java. The text message when listed in mainframe looks like JUNK value.
How can we put the message in mainframe from java so that mainframe can understand or we missing any configuration? Any help on this is highly appreciated. |
|
Back to top |
|
 |
kevinf2349 |
Posted: Fri Jul 07, 2006 9:20 am Post subject: |
|
|
 Grand Master
Joined: 28 Feb 2003 Posts: 1311 Location: USA
|
Sounds like the messages are in ASCII and as I recall the ISPF message browsing utility doesn't do a convert on the get by default.
What are you using to browse the messages on the mainframe to determine that they are 'junk'?
The fact that you can put them and read them from Java means things are fine. If you are only concerned with how they look on the mainframe then convert on the MQGET in the mainframe program |
|
Back to top |
|
 |
fjb_saper |
Posted: Fri Jul 07, 2006 11:12 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Also you are talking about text messages. Make sure that the format is set to 'MQSTR '. You did not tell us whether you had done this.
Enjoy  _________________ MQ & Broker admin |
|
Back to top |
|
 |
john123 |
Posted: Mon Jul 10, 2006 5:09 am Post subject: Message encoding issue in Mainframe (from Java /Windows) |
|
|
Newbie
Joined: 07 Jul 2006 Posts: 3
|
Thanks for the reply. Where we need to set the MQSTR. Because i am creating the text message inside JAVA program. Here i am using javax.jms package. |
|
Back to top |
|
 |
zpat |
Posted: Mon Jul 10, 2006 5:23 am Post subject: |
|
|
 Jedi Council
Joined: 19 May 2001 Posts: 5866 Location: UK
|
If the message's MQMD.Format = MQSTR and the CCSID is correctly describing the message data, then an application (including any queue browser) which does a MQGET with MQGMO_CONVERT will see the message in a suitable format.
In JMS use TextMessage not BytesMessage for correct string handling. |
|
Back to top |
|
 |
fjb_saper |
Posted: Mon Jul 10, 2006 12:16 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
As well are you suppressing the MQRFH header when posting from Java to the Mainframe ? _________________ MQ & Broker admin |
|
Back to top |
|
 |
James_O_K |
Posted: Thu Jul 13, 2006 7:04 am Post subject: Re: Message encoding issue in Mainframe (from Java /Windows) |
|
|
Apprentice
Joined: 09 Mar 2006 Posts: 39 Location: UK
|
john123 wrote: |
We are facing difficulties in reading messages in Mainframe. The messages are available in the mainframe queue but their format is listed in junk characters. The text messages are dropped in directly from Java/JMS application into the mainframe Queue. Please find more details below:
Server Environment: Java client is used. The WebSphere MQ 5.3 is installed in mainframe machine.
Issue: We are storing the message into mainframe Queue via JAVA. Java standalone program is able store the data and retrieve the data from Mainframe MQ. Also Java program is able to read the data from the queue which was put by mainframe. But the issue is that Mainframe could not recognize the format for the text message which was put by Java. The text message when listed in mainframe looks like JUNK value.
How can we put the message in mainframe from java so that mainframe can understand or we missing any configuration? Any help on this is highly appreciated. |
I had a similar problem to this a while back. It was down to CCSID not being set:
http://www.mqseries.net/phpBB2/viewtopic.php?t=27920&highlight= |
|
Back to top |
|
 |
|