Author |
Message
|
aksin |
Posted: Fri Feb 04, 2005 7:50 am Post subject: corell id |
|
|
Novice
Joined: 12 Nov 2002 Posts: 10
|
Here is the scenario:
The sending application A will be writing a message to a remote queue and on the receiving application, an adapter program would read the message off the queue and parse the contents for the file name and then write the message to a directory path with the parsed file name. (The recvr app expects to find the file in a certain path and a specific name)
Can the sending application write the file name as the corellid instead,so that the adapter does not have to parse the message but get the name directly from the corellid field? |
|
Back to top |
|
 |
Michael Dag |
Posted: Fri Feb 04, 2005 9:04 am Post subject: |
|
|
 Jedi Knight
Joined: 13 Jun 2002 Posts: 2607 Location: The Netherlands (Amsterdam)
|
Why not...
personally I would 'abuse' AccountingToken as it is longer (MQBYTE32 versus MQBYTE24). _________________ Michael
MQSystems Facebook page |
|
Back to top |
|
 |
PeterPotkay |
Posted: Fri Feb 04, 2005 9:53 am Post subject: |
|
|
 Poobah
Joined: 15 May 2001 Posts: 7722
|
MQMD_ApplIdentityData is 32 bytes and made for things just like this.
If you want to abuse fields, you could use the MQMD_ReplyToQueue field, as it is 48 bytes long. But this assumes you don't need to use that field for the real reason it was intended for. And you don't mind confusing the next person looking at your code! _________________ Peter Potkay
Keep Calm and MQ On |
|
Back to top |
|
 |
jefflowrey |
Posted: Fri Feb 04, 2005 1:30 pm Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Also, you could use an MQRFH2 header, and put the file name in the usr folder...
And then you wouldn't have to worry about how long the file name was. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
fjb_saper |
Posted: Fri Feb 04, 2005 1:33 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Jeff
I think that is the best answear yet as it will force the CCSID of the information.
Otherwise you might have a file name that means very little as you may not necessarily be able to convert to a different CCSID and the file name looks like giberish...
Thanks Enjoy  |
|
Back to top |
|
 |
PeterPotkay |
Posted: Fri Feb 04, 2005 6:52 pm Post subject: |
|
|
 Poobah
Joined: 15 May 2001 Posts: 7722
|
Never wrote a program that dealt with RFH2 headers, so this is a sincere question:
To look at the RFH2 header, isn't that parsing the contents of the message? Will it be slower that looking at a particular value in the MQMD?
Regardless, the point about the CCSIDs is valid. _________________ Peter Potkay
Keep Calm and MQ On |
|
Back to top |
|
 |
EddieA |
Posted: Fri Feb 04, 2005 11:30 pm Post subject: |
|
|
 Jedi
Joined: 28 Jun 2001 Posts: 2453 Location: Los Angeles
|
Quote: |
To look at the RFH2 header, isn't that parsing the contents of the message? |
Apart from JMS, yes, you have to do it within your application.
Cheers, _________________ Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0 |
|
Back to top |
|
 |
jefflowrey |
Posted: Sat Feb 05, 2005 4:22 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
EddieA wrote: |
Quote: |
To look at the RFH2 header, isn't that parsing the contents of the message? |
Apart from JMS, yes, you have to do it within your application. |
Well, you don't have to write code in WBIMB to parse an MQRFH2 either.
It will be a small performance hit, but you won't for instance have to read the ENTIRE buffer and parse the ENTIRE buffer - just the MQRFH2 section.
And using a standard, flexible header allows one person to write one set of code that will extract and parse the header - and gives you more options for future change.
And there should be sample code available for using the RFH2 from C/C++ as well as plain Java. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
fjb_saper |
Posted: Sat Feb 05, 2005 12:16 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Talking about java in this case I'll take the hit from JMS any day. |
|
Back to top |
|
 |
|