Author |
Message
|
ucbus1 |
Posted: Wed Mar 12, 2008 1:59 pm Post subject: MQMD question |
|
|
Knight
Joined: 30 Jan 2002 Posts: 560
|
Hello:
I came across an interesting situation.
I need to read a binary file into a MQ mesage and send it. Along with it I need to send 62 char text string.
Question:
1. Is there any way I can pass the text as part of the MQ header and send the binary part as data? I do not find a header field that could carry the 62 characters in the header. If I am missing something please correct it.
Please let me know what could be our best option |
|
Back to top |
|
 |
bruce2359 |
Posted: Wed Mar 12, 2008 2:05 pm Post subject: |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9469 Location: US: west coast, almost. Otherwise, enroute.
|
Take a look at the MQMD description in the WMQ Application Programmer Reference manual.
While there isn't a spare 62 character field in the MQMD, you could use the MsgId, CorrelId, GroupId fields. Each is a MQBYTE24 field. 3x24=72.
This is neither elegant nor pretty solution; but it's worked where the application data was proprietary (format not known or couldn't be touched by contract); but additional data needed to travel with it. _________________ I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live. |
|
Back to top |
|
 |
marcin.kasinski |
Posted: Wed Mar 12, 2008 2:10 pm Post subject: |
|
|
Sentinel
Joined: 21 Dec 2004 Posts: 850 Location: Poland / Warsaw
|
bruce2359 wrote: |
While there isn't a spare 62 character field in the MQMD, you could use the MsgId, CorrelId, GroupId fields. Each is a MQBYTE24 field. 3x24=72.
|
I think it is not a good place to store this information.
Believe me
To ucbus1: Why you don't want to send this information together with your binary data ? _________________ Marcin |
|
Back to top |
|
 |
Nigelg |
Posted: Wed Mar 12, 2008 2:13 pm Post subject: |
|
|
Grand Master
Joined: 02 Aug 2004 Posts: 1046
|
1. Send 2 msgs, the first with the text, the second with the binary data, in a logical group, and get the msgs at the destination with get options MQGMO_ALL_MSGS_AVAILABLE
.
2, Put the text in an RFH or RFH2 header, and the binary data in the msg body.
3. Put the data with a user-defined msg format known to SDR and RCVR. If conversion is required write a data conversion exit; there is an app to generate the code for the exit. _________________ MQSeries.net helps those who help themselves.. |
|
Back to top |
|
 |
ucbus1 |
Posted: Wed Mar 12, 2008 2:34 pm Post subject: |
|
|
Knight
Joined: 30 Jan 2002 Posts: 560
|
Nigeleg:
1. Option 1 seems to be right. However it needs some chages to the application getting the messages. On this I have no control.
2. This can be an option we may have to live with it. If so what fields are suggested. Is there any varible length field that accommodates 62 characters
3. Having exits to convert the DATA part ( binary+text) to common format still needs changes to the receiving application . Correct me if I am wrong.
marcin.kasinski, please see my reply( pt:3) for your question |
|
Back to top |
|
 |
Nigelg |
Posted: Wed Mar 12, 2008 9:19 pm Post subject: |
|
|
Grand Master
Joined: 02 Aug 2004 Posts: 1046
|
Any change to the format of the data being sent requires a change to the getting app.
In the RFH/RFH2 header case, the header consists of user-defened variable length fields. Consult the APR. _________________ MQSeries.net helps those who help themselves.. |
|
Back to top |
|
 |
|