ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » IBM MQ Java / JMS » converting MQMD fields - RESOLVED

Post new topic  Reply to topic
 converting MQMD fields - RESOLVED « View previous topic :: View next topic » 
Author Message
teal
PostPosted: Wed Feb 22, 2006 3:19 pm    Post subject: converting MQMD fields - RESOLVED Reply with quote

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
View user's profile Send private message
fjb_saper
PostPosted: Wed Feb 22, 2006 3:26 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
teal
PostPosted: Wed Feb 22, 2006 3:36 pm    Post subject: Reply with quote

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
View user's profile Send private message
fjb_saper
PostPosted: Wed Feb 22, 2006 3:40 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
mvic
PostPosted: Wed Feb 22, 2006 3:42 pm    Post subject: Reply with quote

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
View user's profile Send private message
wschutz
PostPosted: Wed Feb 22, 2006 3:43 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail AIM Address
teal
PostPosted: Wed Feb 22, 2006 4:05 pm    Post subject: Reply with quote

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
View user's profile Send private message
fjb_saper
PostPosted: Wed Feb 22, 2006 4:19 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
mvic
PostPosted: Wed Feb 22, 2006 4:19 pm    Post subject: Reply with quote

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
View user's profile Send private message
teal
PostPosted: Wed Feb 22, 2006 4:34 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » converting MQMD fields - RESOLVED
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.