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 » ESQL code for using XML tag to determine label name

Post new topic  Reply to topic
 ESQL code for using XML tag to determine label name « View previous topic :: View next topic » 
Author Message
vickie_ews
PostPosted: Wed Oct 30, 2002 12:48 pm    Post subject: ESQL code for using XML tag to determine label name Reply with quote

Novice

Joined: 04 Sep 2002
Posts: 18

Thanks for all the replies. May I share how we solved this issue?

A fieldname is identified based on the XML upper level tag. A variable (LABELVAR) is assigned to the fieldname and declared 'found.' The output destination for the labelname is set to the variable (LABELVAR).

--Msg Flow

MQInput--->Compute(AssignType&Label*) ---->Route-to-Label

Label(UNKNOWN)-->Trace--->MQOutput
Label(FACILITIES)--->Compute(Transform)--->MQOutput
Label(FINANCE)--->Compute(Transform)--->MQOutput

--ESQL
***********

SET OutputRoot = InputRoot;

-- Enter SQL below this line. SQL above this line might be regenerated, causing any modifications to be lost.

--Assign a variable to capture request type and when variable is found

DECLARE LABELVAR CHARACTER;
DECLARE BFOUND BOOLEAN;

-- Set initial variable condition
SET LABELVAR = 'UNKNOWN';
SET BFOUND = FALSE;

-- Determine type of request, assign a corresponding label name, and match found condition
IF FIELDNAME (OutputRoot."XML"."org.hn.pa.ari.Facilities") IS NOT NULL THEN
SET LABELVAR = 'FACILITIES';
SET BFOUND = TRUE;
END IF;

IF NOT BFOUND THEN
IF FIELDNAME (OutputRoot."XML"."org.hn.pa.ari.Finance") IS NOT NULL THEN
SET LABELVAR = 'FINANCE';
SET BFOUND = TRUE;
END IF;
END IF;

-- Set request variable found to the label node name

SET OutputLocalEnvironment.Destination.RouterList.DestinationData[1].labelname = LABELVAR;


gratefully,

http://www.mqseries.net/phpBB2/viewtopic.php?t=5691&start=0
Back to top
View user's profile Send private message Yahoo Messenger
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » ESQL code for using XML tag to determine label name
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.