|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
ESQL code to set label name (for MRM) using BLOB |
« View previous topic :: View next topic » |
Author |
Message
|
vickie_ews |
Posted: Wed Oct 30, 2002 1:20 pm Post subject: ESQL code to set label name (for MRM) using BLOB |
|
|
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 |
|
 |
|
|
 |
|
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
|
|
|
|