Author |
Message
|
teal |
Posted: Wed Feb 22, 2006 3:19 pm Post subject: converting MQMD fields - RESOLVED |
|
|
 Acolyte
Joined: 15 Dec 2004 Posts: 66
|
Hi all,
I am sending messages from WAS server (ascii) to an iSeries(as400) system. THe payload is all char, so I set the format to MQSTR and have the iseries mq pgm use convert on the GMO.
the payload seems to be fine and is converted fine, but once I added data into the MQMD portion of the message (only one field, CorrelationID)..it is acting strange and not picking up the messages anymore.. alhtough It is expecting '12345' in the correlID field now.
I even manually convert 12345 from ascii to ebcdic (not anything else), but still not picking up.
Do I need to set the CCSID and ENCODING?
anyone ran into this before? this sucks cause the payload is gold it is this crazy correlID field that is struggling
Last edited by teal on Thu Feb 23, 2006 11:39 am; edited 1 time in total |
|
Back to top |
|
 |
fjb_saper |
Posted: Wed Feb 22, 2006 3:26 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Correlation ID and MessageID are byte arrays. They NEVER get converted.
You need to compare the values byte to byte in Hex.
Enjoy and read the manuals  _________________ MQ & Broker admin |
|
Back to top |
|
 |
teal |
Posted: Wed Feb 22, 2006 3:36 pm Post subject: |
|
|
 Acolyte
Joined: 15 Dec 2004 Posts: 66
|
thanks for such a quick response.
I realize correlID is a byte [], so I manually convert the ascii bytes to ebcdic bytes in mqmd before sending hoping that would fix, because I knew they are not auto converted, only the payload, but nope. I am not setting the CCSID or encoding though. |
|
Back to top |
|
 |
fjb_saper |
Posted: Wed Feb 22, 2006 3:40 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
What part of THEY NEVER GET CONVERTED do you not understand.
Byte 0F in hex is still byte 0F in hex whether it be ASCII or EBCDIC
We are talking about byte arrays not char arrays
This is implementing an anonymous identifier pattern... _________________ MQ & Broker admin
Last edited by fjb_saper on Wed Feb 22, 2006 3:43 pm; edited 1 time in total |
|
Back to top |
|
 |
mvic |
Posted: Wed Feb 22, 2006 3:42 pm Post subject: |
|
|
 Jedi
Joined: 09 Mar 2004 Posts: 2080
|
teal wrote: |
I realize correlID is a byte [], so I manually convert the ascii bytes to ebcdic bytes in mqmd before sending hoping that would fix, because I knew they are not auto converted, only the payload, but nope. |
Could you provide some real data dumps of the data received (and how it differs from the data you expected) so we can see exactly what you're seeing?
Quote: |
I am not setting the CCSID or encoding though. |
Just use the values in MQMD_DEFAULT. |
|
Back to top |
|
 |
wschutz |
Posted: Wed Feb 22, 2006 3:43 pm Post subject: |
|
|
 Jedi Knight
Joined: 02 Jun 2005 Posts: 3316 Location: IBM (retired)
|
teal wrote: |
thanks for such a quick response.
I realize correlID is a byte [], so I manually convert the ascii bytes to ebcdic bytes in mqmd before sending hoping that would fix, because I knew they are not auto converted, only the payload, but nope. I am not setting the CCSID or encoding though. |
I realize it's not working for you, but allow me to suggest that its a bad design.... the sender of a message shoudln't know what platform the receiver is running on .... there's probably a better way to accomplish want you want to do without this messy ebcdic/ascii stuff...
tell us what you're trying to do with correlID and why you need to set it .... _________________ -wayne |
|
Back to top |
|
 |
teal |
Posted: Wed Feb 22, 2006 4:05 pm Post subject: |
|
|
 Acolyte
Joined: 15 Dec 2004 Posts: 66
|
thanks for kind responses, unlike the previous.
essentially the as400 receiver is a legacy system that has always received MQ messages from a mainframe system. The MQ program reads the messages off the queue and looks at the correlationID to determine what happens to the message. It cannot change, for now..
I am trying to test replacing the mainframe system with Linux box running WAS 5.1 and WMQ5.3. IF the as400 did not use this corellationID, i believe it would be perfect, but I'm having trouble getting to read the message with the correlationID i have placed in the MQMD. AS i said the payload is just character data.. the format is MQSTR same as the way the mainframe was sending. |
|
Back to top |
|
 |
fjb_saper |
Posted: Wed Feb 22, 2006 4:19 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Now we are getting somewhere:
So what is the hex value for the string you are expecting on the AS400? (Please no translation) (ex "123" = hex "F1F2F3")
Set this same hex value on the sender side (0x"F1F2F3") and you should start seing results.
 _________________ MQ & Broker admin
Last edited by fjb_saper on Wed Feb 22, 2006 4:23 pm; edited 1 time in total |
|
Back to top |
|
 |
mvic |
Posted: Wed Feb 22, 2006 4:19 pm Post subject: |
|
|
 Jedi
Joined: 09 Mar 2004 Posts: 2080
|
OK, if at all possible, it would be good to look at some real correlIds from this problem, and even the code that is performing the (failing) check, to ensure we all know what is being talked about "for real". |
|
Back to top |
|
 |
teal |
Posted: Wed Feb 22, 2006 4:34 pm Post subject: |
|
|
 Acolyte
Joined: 15 Dec 2004 Posts: 66
|
I have resolved the issue.
The solution was extremely simple, but nevertheless gave me fits for an entire day and I appreciate all the replies.
Basically, I was running the ascii corellationID through my asciiTOebcdic byte converter but I was only placing what I needed on the field and not padding it the 24 spaces.
So yes it needs the hex spaces to pad the rest of the field and Voila everything is working now.
i.e.
Quote: |
Correlation ID . . . : 5 8
Correlation ID
(Hexadecimal) . . : F5F840404040404040404040404040404040404040404040
|
thanks again |
|
Back to top |
|
 |
|