|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Variable length Strings |
« View previous topic :: View next topic » |
Author |
Message
|
Deepika |
Posted: Tue Jul 23, 2002 3:06 am Post subject: Variable length Strings |
|
|
Novice
Joined: 03 Jul 2002 Posts: 14
|
Is there some way of defining variable length strings to MRM.
We have tried using the option : NULL Terminated string
but we do not need the NULL terminator in the Output data.
Also with fixed length strings the remaining fields are padded with the padding characters which we do not need.
Any help is genuinely appreciated.. |
|
Back to top |
|
 |
udaybho |
Posted: Tue Jul 23, 2002 7:11 am Post subject: |
|
|
Voyager
Joined: 09 May 2002 Posts: 94 Location: Chicago
|
DECLARE variable CHARACTER
I am sure you are looking for something more. Sorry if I did not understand you.
Uday Bhosle |
|
Back to top |
|
 |
kirani |
Posted: Tue Jul 23, 2002 3:54 pm Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
You could define variable length string in following ways into MRM
1. Reference by an INTEGER field.
2. Null terminated Strings.
3. End of Bitstream.
Can you use any of these options? _________________ 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 |
|
 |
ernest-ter.kuile |
Posted: Wed Jul 24, 2002 4:20 am Post subject: Re: Variable length Strings |
|
|
 Apprentice
Joined: 13 May 2002 Posts: 49 Location: KLM Holland
|
Deepika wrote: |
Is there some way of defining variable length strings to MRM.
We have tried using the option : NULL Terminated string
but we do not need the NULL terminator in the Output data.
|
I'm not sure I follow you. I interpret it as asking if the NULL must be there when declaring a NULL terminated string in and MRM.
we had the following problem. In some flows we only needed to parse the header of a message, however, this header would then be followed by a variable length (body) message, text usually, but could also be XML but not BLOB (the content of which was not interresting at that time)
We ended up (miss)using the NULL terminated variable string after the declaration of the header, knowing there would never be a NULL in the rest of the message.
The MRM parser did exacly as expected, it placed the rest (the body in fact) of the message in one big string, which we could save and blissfull ignore while handling the header alone.
In other words the declared NULL need not be in the string at all, as long as the MRM parser has a way of finding the end of it.
Note that even if there had been a NULL at the end of the body of the message, then the NULL would not have been present in the parsed MRM (Output data).
Deepika wrote: |
Also with fixed length strings the remaining fields are padded with the padding characters which we do not need.
|
I'm not sure, but I think that if you pad with NUL, then your string length (in a compute node) will only be up to the first NUL, even though the space your string occupies in the MRM struct will still be fixed.
Deepika wrote: |
Any help is genuinely appreciated.. |
Cheers,
Ernest. |
|
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
|
|
|
|