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 » Parsing message whith Filter Node

Post new topic  Reply to topic
 Parsing message whith Filter Node « View previous topic :: View next topic » 
Author Message
delerium
PostPosted: Wed Jan 31, 2007 6:08 am    Post subject: Parsing message whith Filter Node Reply with quote

Novice

Joined: 27 Nov 2006
Posts: 13

Hi
I'am newbie in the message flows. I basically need to construct a little flow what parsing a Input Message and depending of parameter CODE, send a output message to respective Output Node. For this I have a flow composed for a Input Node, a Filter Node, and two Out Nodes.


The esql code is:

CREATE FILTER MODULE NODE_Filter
CREATE FUNCTION Main() RETURNS BOOLEAN
BEGIN
DECLARE NAME_PROCEDURE CHARACTER;
DECLARE CODE CHARACTER;
DECLARE DESCRIPTION CHARACTER;

SET NAME_PROCEDURE = SUBSTRING(InputRoot.MRM.DATA FROM 1 FOR 22);
SET CODE = SUBSTRING(InputRoot.MRM.DATA FROM 23 FOR 25);
SET DESCRIPTION = SUBSTRING(InputRoot.MRM.DATA FROM 26 FOR 226);

SET OutputRoot.XML.Hdr.NAME_PROC = NAME_PROCEDURE;
SET OutputRoot.XML.Hdr.code = CODE;
SET OutputRoot.XML.Hdr.descript = DESCRIPTION;

-- it reviews code

IF CODE = '000' THEN
RETURN TRUE;
ELSE
RETURN FALSE;
END IF;


--RETURN TRUE;
END;

END MODULE;


I proved this code but they exist problems whith InputRoot.

Thanxs
Back to top
View user's profile Send private message
gregop
PostPosted: Wed Jan 31, 2007 6:19 am    Post subject: Reply with quote

Voyager

Joined: 24 Nov 2006
Posts: 81

If you want to change the message for output you will need to do this via a node that can update the message tree such as a compute node.

You cannot change the message tree in a Filter node, so correlation names InputRoot, OutputRoot do not apply - the message can be referred to by the correlation name of Root in a node that cannot update the tree.

http://publib.boulder.ibm.com/infocenter/wmbhelp/v6r0m0/index.jsp?topic=/com.ibm.etools.mft.doc/ac00510_.htm
Back to top
View user's profile Send private message
delerium
PostPosted: Wed Jan 31, 2007 6:36 am    Post subject: Reply with quote

Novice

Joined: 27 Nov 2006
Posts: 13

I don't view this link
And a example of esql code...................
Please it's urgent

thanks
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Wed Jan 31, 2007 6:42 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

If it's urgent, then you should urgently view the link.

If you can't get to it, then you should say that.

Use a compute node.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed Jan 31, 2007 6:54 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

delerium wrote:
I don't view this link


If you're a newbie, you should find out why you can't see this link and fix it.

It's a vital resource.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
john arden
PostPosted: Mon Feb 12, 2007 5:12 am    Post subject: ESQL Code knowledge. Reply with quote

Novice

Joined: 21 Feb 2006
Posts: 19

I think your problem is in your understanding of the "substring" parameters. The "FOR" parameter is the length of the string you want NOT the end position as your sample seems to show.

Try the For as 3 for code and 200 for description and I think you will get a better result.
_________________
John Arden
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 » Parsing message whith Filter Node
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.