|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Most efficient way to split an MRM string field |
« View previous topic :: View next topic » |
Author |
Message
|
CHERIANV |
Posted: Wed Mar 05, 2003 12:16 pm Post subject: Most efficient way to split an MRM string field |
|
|
Apprentice
Joined: 15 Feb 2002 Posts: 43 Location: New York
|
Hi,
I have an input MRM field that is a 996 byte string. This field has values that are delimited by '*' that i need to extract individually for creating detail items. I was thinking of using POSITION and SUBSTRING to manipulate this string . Any other better ways to do this ? Thanks in advance!
NOTE:
Am using WMQI 2.1 CSD04 . |
|
Back to top |
|
 |
jefflowrey |
Posted: Wed Mar 05, 2003 12:54 pm Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
If you're already modelling the message in the MRM, you should be able to create a compound type that includes the subfields, and specify the '*' delimiter to break them apart.
If the fields that are in any given message are dynamic, you can setup a Choice field to describe the different possibilites, and then resolve that choice within your ESQL or by using data patterns.
There are examples of this kind of advanced message modeling in teh Working With Messages book. |
|
Back to top |
|
 |
CHERIANV |
Posted: Thu Mar 06, 2003 7:23 am Post subject: |
|
|
Apprentice
Joined: 15 Feb 2002 Posts: 43 Location: New York
|
Hi,
Thanks for your response. Apparently, the input MRM is from a remote partner and I would prefer not to change their structure by editing the message set. Is there a better alternative just by using ESQL ? |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu Mar 06, 2003 7:29 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Other than using the Position and Substring functions you mentioned, the only other option I'm aware of is using the Create Field with parse function, and creating a separate MRM definition for your string. This is likely slower than using Position and Substring.
I'd love to be able to index into character fields with an array syntax or a reference variable. But it's not available that I know of. |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|