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 to set label name (for MRM) using BLOB

Post new topic  Reply to topic
 ESQL code to set label name (for MRM) using BLOB « View previous topic :: View next topic » 
Author Message
vickie_ews
PostPosted: Wed Oct 30, 2002 1:20 pm    Post subject: ESQL code to set label name (for MRM) using BLOB Reply with quote

Novice

Joined: 04 Sep 2002
Posts: 18

Thanks all for your suggestions. Lung, you were right -- using the HEX takes some practice.

May share how we resolved the route 2 label issue using BLOB (for incoming Cobol string)? In this case, the first 4 bytes of the message identify the transaction type.

--Msg Flow

MQInput(BLOB)-->Compute(AssignLabel)-->Route2Label

Label(UNKNOWN) --->Trace ---> MQOutput
Label(FACILITIES) -->Subflow[RCD(MRM)--->Compute(Transform)]-->MQOutput

Label(FINANCE) -->Subflow[RCD(MRM)-->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 variable for incoming string, transaction type, labelname, and when found

DECLARE STRINGTYPE BLOB;
DECLARE TRANSTYPE CHARACTER;
DECLARE LABELVAR CHARACTER;
DECLARE BFOUND BOOLEAN;

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

-- Determine what type of response

SET STRINGTYPE = SUBSTRING(InputBody.BLOB FROM 1 for 4);
SET TRANSTYPE = CAST(STRINGTYPE AS CHARACTER);

--Assign a corresponding label name, announce match found condition

IF TRANSTYPE = 'X''30323131''' THEN
SET LABELVAR = 'FACILITIES';
SET BFOUND = TRUE;
END IF;


IF TRANSTYPE = 'X''30323335''' THEN
SET LABELVAR = 'FINANCE';
SET BFOUND = TRUE;
END IF;


-- Set request variable found to the label node name
SET OutputLocalEnvironment.Destination.RouterList.DestinationData[1].labelname = LABELVAR;

--END OF ESQL


After label, we used subflow to Reset Content Descriptor to MRM and continue with more message transformation.


gratefully,


http://www.mqseries.net/phpBB2/viewtopic.php?t=5692&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 to set label name (for MRM) using BLOB
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.