Author |
Message
|
psdprasad |
Posted: Thu Jun 09, 2005 9:28 am Post subject: Sun to Mainframe MQ Messaging |
|
|
Newbie
Joined: 09 Jun 2005 Posts: 2
|
Hi,
We are currently doing a project in which the front-end Windows based application posts a request string thru xmlhttp to a Java servlet running on a weblogic server (SUN). The Java servlet uses Java MQ API's to put and get messages to and from the MQ. The request messages are placed for the mainframe based host programs to read and respond.
We are able to successfully transact messages in English language. But messages in other languages (Polish, for example - specifically those with lead or trail byte) get shifted by some bytes when they are received by the mainframe host MQ. We could find that the values in the request string are in exact positions as agreed upon....until they are placed on the MQ. The same problem exists when the response is made by the mainframe MQ.
Can you please suggest solutions to resolve this?
Thanks in advance,
Regards,
prasad. |
|
Back to top |
|
 |
fjb_saper |
Posted: Thu Jun 09, 2005 12:18 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Can you use the readutf an write utf methods ?
Can you change the CCSID on your message to point to the polish CCSID ?
Enjoy  |
|
Back to top |
|
 |
EddieA |
Posted: Thu Jun 09, 2005 3:23 pm Post subject: |
|
|
 Jedi
Joined: 28 Jun 2001 Posts: 2453 Location: Los Angeles
|
Quote: |
Can you use the readutf an write utf methods |
I don't think those manipulate the contents of the string, just use a 2 byte length prefix.
Cheers, _________________ Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0 |
|
Back to top |
|
 |
fjb_saper |
Posted: Thu Jun 09, 2005 4:31 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
It's not about manipulating the string but about preserving it.
If you used write UTF and use Read UTF the string does not get translated from ascii to ebcedic etc...(because it is and stays in UTF)
Enjoy
 |
|
Back to top |
|
 |
psdprasad |
Posted: Sat Jun 11, 2005 11:17 pm Post subject: |
|
|
Newbie
Joined: 09 Jun 2005 Posts: 2
|
Hi,
can I set the format of the message as MQFMT_STRING and try writeUTF()
I tried with and without setting the format, but writeUTF and readUTF doesnt seem to work (even with CCSID set for Polish).
Any other properties to be set while using WriteUTF/ReadUTF?
Thanks
prasad |
|
Back to top |
|
 |
fjb_saper |
Posted: Sun Jun 12, 2005 2:30 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
You have to know as well how the slavic/polish alphabet translates to IBM37 or IBM500 CCSIDs. Some of the characters (single chars in the slavic alphabet) might get replaced with 2 chars in the IBM english alphabet.
Now if there is no place for expansion in your text / field that may pose a problem as the next field may get shifted over some chars....
Why not go xml? Field delimiters should be quite clear there...
Enjoy  |
|
Back to top |
|
 |
bower5932 |
Posted: Sun Jun 12, 2005 1:34 pm Post subject: |
|
|
 Jedi Knight
Joined: 27 Aug 2001 Posts: 3023 Location: Dallas, TX, USA
|
psdprasad wrote: |
can I set the format of the message as MQFMT_STRING and try writeUTF() |
The MQFMT_STRING is telling WMQ that the message is 100% string (or text data). The utf functions write 2 bytes of length on front of the data so they don't qualify as MQFMT_STRING. |
|
Back to top |
|
 |
|