Author |
Message
|
swidge |
Posted: Mon Oct 16, 2006 2:19 am Post subject: EBCDIC - ASCII conversion of CorrelID/MssgId fields |
|
|
Newbie
Joined: 16 Oct 2006 Posts: 1
|
Hi,
We have a mainframe app sending data to a unix machine. The mainfranme app claims they are populating the CorrelId and MssgId field in ASCII, however at the Unix end we are receiving the fields in EBCDIC. Can MQ be converting this automatically? Is there a flag in MQ to automatically convert the ASCII to EBCDIC?
I just want to ensure whether MQ is doing this conversion or not? According to me if the Mainframe app passes MssgId and CorrelId in ASCII then the unix side should recv this in ASCII. |
|
Back to top |
|
 |
fjb_saper |
Posted: Mon Oct 16, 2006 2:29 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
MessageId and CorrelationId are byte arrays and not String. So please don't treat them as strings.
As a rule they NEVER get converted. A byte is a byte is a byte and has the same value on any platform.
Enjoy and RTFM  _________________ MQ & Broker admin |
|
Back to top |
|
 |
tleichen |
Posted: Mon Oct 16, 2006 6:42 am Post subject: |
|
|
Yatiri
Joined: 11 Apr 2005 Posts: 663 Location: Center of the USA
|
 _________________ IBM Certified MQSeries Specialist
IBM Certified MQSeries Developer |
|
Back to top |
|
 |
Vitor |
Posted: Mon Oct 16, 2006 6:59 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
If the mainframe app was (for some bizarre reason) putting an ASCII string into either of the ID fields, when conversion was done at the Unix end the conversion would occur from the sending code page (EBCDIC) into ASCII, so the ASCII characters of the id would be "converted" the EBCDIC values they represented into the ASCII equivalent. Or as we say on my planet, useless rubbish.
Except that you wouldn't have specified conversion because these were already ASCII values. So the rest of the message body would be left in EBCDIC.....
......and those values are never converted by MQ because they're not strings they're byte arrays!!!!
If you need application data in the MQMD use the fields IBM have kindly provided for the purpose. Don't meddle with the other values and at the least respect the data type - not every collection of bytes holds a string!
I commend the Application Programming Guide to both you and the mainframe coders. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
bruce2359 |
Posted: Tue Oct 17, 2006 11:44 am Post subject: |
|
|
Guest
|
From the Application Programmers Reference:
MsgId (MQBYTE24)
This is a byte string that is used to distinguish one message from another. Generally, no two messages should have the same message identifier, although this is not disallowed by the queue manager. The message identifier is a permanent property of the message, and persists across restarts of the queue manager.
Because the message identifier is a byte string and not a character string, the message identifier is not converted between character sets when the message flows from one queue manager to another. |
|
Back to top |
|
 |
fjb_saper |
Posted: Tue Oct 17, 2006 2:42 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Bruce, Please don't use byte string. It leads to a ton of confusion.
It is a byte array. The particular values of a single byte may and will not be in any range that allows transformation into a char/string. _________________ MQ & Broker admin |
|
Back to top |
|
 |
|