ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Dynamic delimiter

Post new topic  Reply to topic
 Dynamic delimiter « View previous topic :: View next topic » 
Author Message
kspranava
PostPosted: Tue Sep 20, 2005 11:31 pm    Post subject: Dynamic delimiter Reply with quote

Centurion

Joined: 27 Apr 2003
Posts: 124

Hi Gurus,

My message set needs to parse the incoming message based on the delimiter. Here the catch is, delimiter is dynamic. MQRFH header has a field containing the delimiter value. Pls let me know how to assign that particular MQRFH header field to the delimiter.

example:
If MQRFH.Delimter = '~' then data will be like DATA1~DATA2~DATA3<CR><LF>
If MQRFH.Delimter = '$' then data will be like DATA1$DATA2$DATA3<CR><LF>

where <CR><LF> is the record delimiter.

Thanks in advance,
kspranava.
Back to top
View user's profile Send private message
elvis_gn
PostPosted: Wed Sep 21, 2005 12:06 am    Post subject: Reply with quote

Padawan

Joined: 08 Oct 2004
Posts: 1905
Location: Dubai

Don't set any message set to the Input node and let the entire message get in using MRM.....In a compute node, fetch the delimiter from the MQRFH, convert the message to BLOB and replace the delimiter in the BLOB message with some standard delimiter say '|'.

Once this is done pass it through a RCD(where one message set with '|' delimiter is defined) and carry on with the other operations....
Back to top
View user's profile Send private message Send e-mail
javaforvivek
PostPosted: Wed Sep 21, 2005 3:06 am    Post subject: Reply with quote

Master

Joined: 14 Jun 2002
Posts: 282
Location: Pune,India

Pranava,
The suggestion by Elvis is a good one, but it will alter the contents of the message, so if you want your original message back at the output node, then you need to exactly reverse the flow of replacing '|' by your delimiter.
If you are altering your MQRFH in the due course, then may be that you will lose the delimiter, so its a good idea to store it in an Environment Variable if required.
For e.g.,
If MQRFH.Delimter = '~' then data will be like DATA1~DATA2~DATA3<CR><LF>
Then replace it by '|' so it will look like,
DATA1|DATA2|DATA3<CR><LF>
Store this delimiter to some Environment Varible (only if you are going to lose the MQRFH header in the due course of processing),
Code:
SET Environment.Delimiter = '$'


After you are done, get back your original message.

Elvis wrote:
Quote:

Don't set any message set to the Input node and let the entire message get in using MRM.....In a compute node, fetch the delimiter from the MQRFH, convert the message to BLOB and replace the delimiter in the BLOB message with some standard delimiter say '|'.

Once this is done pass it through a RCD(where one message set with '|' delimiter is defined) and carry on with the other operations....


Elvis, I think pranava can set BLOB parser at MQInputNode itself, rather than setting MRM t MQInput and then changing it to BLOB, and then again applying another RCD to get back to MRM.
He can simply start with BLOB, replace the delimiter by '|' and then apply RCD as you have suggested.
_________________
Vivek
------------------------------------------------------
...when you have eliminated the impossible, whatever remains, however improbable, must be the truth.
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
jefflowrey
PostPosted: Wed Sep 21, 2005 3:45 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

But remember, the MQRFH2 could specifify a value for the message set, message domain and etc, and override whatever is set on the MQInputNode's default properties.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
elvis_gn
PostPosted: Wed Sep 21, 2005 4:11 am    Post subject: Reply with quote

Padawan

Joined: 08 Oct 2004
Posts: 1905
Location: Dubai

Hi javaforvivek,
I did think of taking it in as BLOB initially itself, but felt that it will be difficult to search for the Delimiter in the MQRFH in that case....In this situation atleast u can go through the tree to find the delimiter...

But I do agree it will makes things simpler when it comes to the overall flow....
Back to top
View user's profile Send private message Send e-mail
jefflowrey
PostPosted: Wed Sep 21, 2005 4:12 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

You can model a message with a single BLOB field...

But even if you take it as BLOB, Broker will still parse the MQRFH2 and it will still be at Root.MQRFH2.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
javaforvivek
PostPosted: Wed Sep 21, 2005 4:13 am    Post subject: Reply with quote

Master

Joined: 14 Jun 2002
Posts: 282
Location: Pune,India

Elvis,
I forgot tht MQRFH is the part of payload, and will be parsed along with the message data. My mistake.
_________________
Vivek
------------------------------------------------------
...when you have eliminated the impossible, whatever remains, however improbable, must be the truth.
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
jefflowrey
PostPosted: Wed Sep 21, 2005 4:18 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Am I wrong?

I got to start playing with this product more. Been too long...
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
javaforvivek
PostPosted: Wed Sep 21, 2005 4:23 am    Post subject: Reply with quote

Master

Joined: 14 Jun 2002
Posts: 282
Location: Pune,India

jefflowrey,

You are absolutely right in this case. I was wrong in suggesting tht pranava can start with BLOB field as I overlooked the fact tht MQRFH is the part of payload.

_________________
Vivek
------------------------------------------------------
...when you have eliminated the impossible, whatever remains, however improbable, must be the truth.
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
jefflowrey
PostPosted: Wed Sep 21, 2005 4:26 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

javaforvivek wrote:
jefflowrey,

You are absolutely right in this case. I was wrong in suggesting tht pranava can start with BLOB field as I overlooked the fact tht MQRFH is the part of payload.


Okay. I think I'm confused.

I think pranava *can* use BLOB, because the MQRFH header will be parsed ANYWAY, and not be kept in Root.BLOB.BLOB, but will be put into Root.MQRFH or Root.MQRFH2.

So that the delimiter will be easily accessible, and the actual "payload" of hte message will be in Root.BLOB.BLOB and pranava won't have to write code to skip the MQRFH haeder and etc.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Dynamic delimiter
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.