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 » General Discussion » EBCDIC - ASCII conversion of CorrelID/MssgId fields

Post new topic  Reply to topic
 EBCDIC - ASCII conversion of CorrelID/MssgId fields « View previous topic :: View next topic » 
Author Message
swidge
PostPosted: Mon Oct 16, 2006 2:19 am    Post subject: EBCDIC - ASCII conversion of CorrelID/MssgId fields Reply with quote

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
View user's profile Send private message
fjb_saper
PostPosted: Mon Oct 16, 2006 2:29 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
tleichen
PostPosted: Mon Oct 16, 2006 6:42 am    Post subject: Reply with quote

Yatiri

Joined: 11 Apr 2005
Posts: 663
Location: Center of the USA


_________________
IBM Certified MQSeries Specialist
IBM Certified MQSeries Developer
Back to top
View user's profile Send private message
Vitor
PostPosted: Mon Oct 16, 2006 6:59 am    Post subject: Reply with quote

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
View user's profile Send private message
bruce2359
PostPosted: Tue Oct 17, 2006 11:44 am    Post subject: Reply with quote

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
PostPosted: Tue Oct 17, 2006 2:42 pm    Post subject: Reply with quote

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

MQSeries.net Forum Index » General Discussion » EBCDIC - ASCII conversion of CorrelID/MssgId fields
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.