Author |
Message
|
tanbsj |
Posted: Tue May 18, 2004 8:29 pm Post subject: Conversion of Msgid and Correlid |
|
|
Novice
Joined: 08 Jun 2003 Posts: 16
|
Hi everyone,
Can anyone advise me on how to convert the Msgid and Correlid from
EBCDIC to ASCII.
I have read somewhere that said Msgid and Correlid will not be automatic converted. Is this true? If true, what are the way to convert
from EBCDIC to ASCII?
Please help.
Thank you in advance.  |
|
Back to top |
|
 |
EddieA |
Posted: Tue May 18, 2004 10:07 pm Post subject: |
|
|
 Jedi
Joined: 28 Jun 2001 Posts: 2453 Location: Los Angeles
|
Quote: |
Msgid and Correlid will not be automatic converted. Is this true? |
Absolutely. Those fields are defined as BYTE24. Any conversion must be "home grown".
Why do you need to convert them. Perhaps if you explain why you think you need this, someoine may come up with a suitable solution.
Cheers, _________________ Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0 |
|
Back to top |
|
 |
tanbsj |
Posted: Tue May 18, 2004 11:07 pm Post subject: |
|
|
Novice
Joined: 08 Jun 2003 Posts: 16
|
Hi EddieA
Thank you so much for your reply.
The correlid is to use for keeping track of a long messages being
split to a few smaller messages.
We will try to write the convert on the mqput program
Thank you so much  |
|
Back to top |
|
 |
jefflowrey |
Posted: Wed May 19, 2004 3:44 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
you're going to have trouble if you are actually using these IDs in your code AND you convert them.
Since MQSeries treats them as byte arrays rather than text strings, if you convert them you are going to lose your correlation.
The basic approach to recording them for tracking processes is to convert the byte into a hex string. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
bower5932 |
Posted: Wed May 19, 2004 5:01 am Post subject: |
|
|
 Jedi Knight
Joined: 27 Aug 2001 Posts: 3023 Location: Dallas, TX, USA
|
Can't you do something to put your messages into a group rather than using the correlation id to keep track of the pieces? You could use the MD flags of MQMF_MSG_IN_GROUP and MQMF_LAST_MSG_IN_GROUP to do your puts. You could then do your gets by matching on the group id. There are details in the Application Programming Guide/Reference. |
|
Back to top |
|
 |
tanbsj |
Posted: Wed May 19, 2004 7:47 pm Post subject: |
|
|
Novice
Joined: 08 Jun 2003 Posts: 16
|
Hi all,
Thank you so much. Will re-study the design again.
 |
|
Back to top |
|
 |
kirani |
Posted: Thu May 20, 2004 6:51 am Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
I think if you "convert" the correl-id correctly then there should not be any problem.
For example, Let's say your m/f program sets the CorrelID on a group (nothing to do with MQ Message Groups) of 5 messages to
RQST1
RQST2
RQST3
RQST4
RQST5
Now when these messages comes to NT queue manager the correl-ID will look something like this.
X'D9D8E2E3F1......'
X'D9D8E2E3F2......'
X'D9D8E2E3F3......'
X'D9D8E2E3F4......'
X'D9D8E2E3F5......'
Your "conversion" module will convert these values from EBCDIC to ASCII. After conversion these values will look like this,
X'5251535431.......'
X'5251535432.......'
X'5251535433.......'
X'5251535434.......'
X'5251535435.......'
With this you are still retaining the Correlation info.
We use this method of conversion all the time in the Broker and it's working fine. _________________ Kiran
IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries
|
|
Back to top |
|
 |
|