Author |
Message
|
AS400AK |
Posted: Sat Sep 08, 2012 9:07 am Post subject: Issue with messages received on iseries |
|
|
Newbie
Joined: 08 Sep 2012 Posts: 6
|
We have a java application deployed on the pos register and also on AS400 IFS which read the sales transactions, generates MQ messages and sends it finally to AS400 mq queue.
This particular java application sends the MQ messages in a perfect format from POS to AS400 and also from AS400 IFS to AS400.(We have confirmed this by putting trace and printing the SYSOUT which shows the message body).
However here is the the problem:
The MQ messages which are received from POS to AS400 are in a perfectly good format and get processed fine however those which are received from AS400 IFS are not in a good format and the donwstream rpg program gives decimal data errors due to invalid characters in the message.
These MQ messages itself looks garbled.
Is there any setting on IFS or AS400 which may cause this?  |
|
Back to top |
|
 |
mqjeff |
Posted: Sat Sep 08, 2012 9:10 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
Use a tool to compare the MQMD of the messages that are good and the messages that are bad.
I suspect you will find that the bad messages have the wrong value in the CodedCharSetID and in the Encoding. |
|
Back to top |
|
 |
AS400AK |
Posted: Sat Sep 08, 2012 10:24 am Post subject: |
|
|
Newbie
Joined: 08 Sep 2012 Posts: 6
|
Unfortunately I don't have the tools to verify that currently. Is there any way to check on AS400 how the CCSID and encoding is set for the receiving messages? However I wonder if that solves anything since the receiving queue manager and queue is the same.
Sorry...but I am quite new to MQ on Iseries or any MQ for that matter  |
|
Back to top |
|
 |
AS400AK |
Posted: Sat Sep 08, 2012 11:03 am Post subject: |
|
|
Newbie
Joined: 08 Sep 2012 Posts: 6
|
Message received from POS to AS400 queue look like this:
OFFSET HEXADECIMAL TEXT
0000 F0F0F1F0 F1F2F6C2 D9C7D9E3 F2F0F1F2 <0010126BRGRT2012>
0010 F0F9F0F9 F0F3F4F7 F0F5F0F0 F0F0F0F1 <0909034705000001>
0020 F2F0F1F2 F0F9F0F7 C2D9E4D7 C4F44040 <20120907BRUPD4 >
0030 40404040 C9E3D4D7 E4F1F0F4 F6F9F9F0 < ITMPU1046990>
0040 F1F0F2F9 F6F5F6F0 F5F9F7F2 F1F7F0F0 <1029656059721700>
0050 F0F0F0F0 F0F0F1F4 F5F1F1F8 F9F1F0F0 <0000001451189100>
0060 F0F0F0F0 F0F0F0F0 F0F0F0F0 F0F0F0F1 <0000000000000001>
0070 F4F9F94E F0F0F0F1 F0F0F0F0 F1F0F5F5 <499+000100001055>
0080 F1F0F0F0 F0 <10000 >
However Message received from AS400 IFS to AS400 queue look like this:
OFFSET HEXADECIMAL TEXT
0000 30303230 32353242 52475254 32303132 <.......âêåêè....>
0010 30393039 30333537 35303030 30303031 <................>
0020 32303132 30383233 42525550 44342020 <........âêÃ&à ...>
0030 20202020 49544D50 55313034 36393930 <....ñè(&Ã.......>
0040 31303239 33353630 36353838 39333030 <................>
0050 30303030 30303030 30303131 36313030 <................>
0060 30303030 30303030 30303030 30303030 <................>
0070 3633302B 30303031 30303030 33303435 <................>
0080 39303030 30363036 35383839 33303030 <................>
0090 30303030 30303030 30313136 31303030 <................>
00A0 30303030 30303030 30303030 30303036 <................>
00B0 33302B30 30303130 30303033 30343539 <................>
00C0 30303030 36303635 38383933 30303030 <................> |
|
Back to top |
|
 |
Vitor |
Posted: Sat Sep 08, 2012 12:09 pm Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
AS400AK wrote: |
Is there any way to check on AS400 how the CCSID and encoding is set for the receiving messages? |
Yes. You look in the MQMD as my most worthy associate suggests.
AS400AK wrote: |
However I wonder if that solves anything since the receiving queue manager and queue is the same. |
It solves everything. These values are intrepreted by the receiving end but set by the sending application. So it's likely that the POS is setting one CCSID and the AS400 another, and the receiving application can't or won't convert them. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
Vitor |
Posted: Sat Sep 08, 2012 12:10 pm Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
AS400AK wrote: |
Message received from POS to AS400 queue look like this:
...
|
Which are clearly using 2 different code pages. As has been suggested to you already. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
AS400AK |
Posted: Sat Sep 08, 2012 12:59 pm Post subject: |
|
|
Newbie
Joined: 08 Sep 2012 Posts: 6
|
As I said before I am quite new to MQ on iSeries so can you please tell me how should I check the message CCSID/Codepage in MQMD on iSeries? |
|
Back to top |
|
 |
Vitor |
Posted: Sat Sep 08, 2012 5:54 pm Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
AS400AK wrote: |
As I said before I am quite new to MQ on iSeries so can you please tell me how should I check the message CCSID/Codepage in MQMD on iSeries? |
You've got more i/Series experience than I have. I would theorize that whatever you used to dump out the message payloads that you posted previously would have the ability to display the MQMD.
But that's just a theory.
At the worst case, get the receiving application to write it out to a log or something. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
fjb_saper |
Posted: Sat Sep 08, 2012 7:33 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Looks to me like the "good" messages are in EBCDIC and the "bad" messages are in ASCII.
This is a CCSID issue. Make sure the receiving application uses a get with convert option. Make sure the sending application uses format MQFMT_STRING when setting the message format (for a text message) and sets the correct CCSID.
Have fun  _________________ MQ & Broker admin |
|
Back to top |
|
 |
AS400AK |
Posted: Mon Sep 10, 2012 6:20 am Post subject: |
|
|
Newbie
Joined: 08 Sep 2012 Posts: 6
|
I will try this but it is still baffling to me that the same application when runs on POS register sends the messages in EBCDIC however when it runs on AS400 sends it in ASCII.  |
|
Back to top |
|
 |
zpat |
Posted: Mon Sep 10, 2012 7:09 am Post subject: |
|
|
 Jedi Council
Joined: 19 May 2001 Posts: 5866 Location: UK
|
It's possible that you have convert(yes) on the sender channels between the systems.
Incidentally this is a cheap (and inferior) way of converting messages, but using get with MQGMO_CONVERT is better (or the JMS equivalent which is to use text messages not binary messages).
Both rely on having a proper MQMD Format and CCSID set. |
|
Back to top |
|
 |
Vitor |
Posted: Mon Sep 10, 2012 7:20 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
AS400AK wrote: |
I will try this but it is still baffling to me that the same application when runs on POS register sends the messages in EBCDIC however when it runs on AS400 sends it in ASCII.  |
Why? The application could easily be sourcing the code page it needs to use from something environment specific. Especially if whoever wrote the code didn't know about WMQ's conversion abilities. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
Vitor |
Posted: Mon Sep 10, 2012 7:20 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
zpat wrote: |
It's possible that you have convert(yes) on the sender channels between the systems. |
 _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
nathanw |
Posted: Mon Sep 10, 2012 7:24 am Post subject: |
|
|
 Knight
Joined: 14 Jul 2004 Posts: 550
|
if you want to look at the data in a message on a queue and you have external access then use a support pac eg ih03 to read / browse the queue you will be an
able to read the MQMD then _________________ Who is General Failure and why is he reading my hard drive?
Artificial Intelligence stands no chance against Natural Stupidity.
Only the User Trace Speaks The Truth  |
|
Back to top |
|
 |
exerk |
Posted: Mon Sep 10, 2012 7:26 am Post subject: |
|
|
 Jedi Council
Joined: 02 Nov 2006 Posts: 6339
|
AS400AK wrote: |
I will try this but it is still baffling to me that the same application when runs on POS register sends the messages in EBCDIC however when it runs on AS400 sends it in ASCII.  |
OK, I'm getting a little confused. Your original post states: "...This particular java application sends the MQ messages in a perfect format from POS to AS400 and also from AS400 IFS to AS400..." but then goes on to state: "...The MQ messages which are received from POS to AS400 are in a perfectly good format and get processed fine however those which are received from AS400 IFS are not in a good format..." - which is it? _________________ It's puzzling, I don't think I've ever seen anything quite like this before...and it's hard to soar like an eagle when you're surrounded by turkeys. |
|
Back to top |
|
 |
|