IIB|Compute Node|ESQL String Manipulation Functions| STARTSWITH | ENDSWITH | CONTAINS

preview_player
Показать описание
Mithun Thadi|IIB|Compute Node|ESQL String Manipulation Functions| STARTSWITH | ENDSWITH | CONTAINS
Can be used upon BIT, BLOB, CHARACTER datatypes only
Access Input Message body and check the input string and set the output root depending on the result
Required : Pre-Installed
MQ v8.5
IIB v10
Overview :
----------------------------------------------------------------------------------------------------------
Description :
This video is reference purpose only.
This video consists of esql code to access the values from message body and insert them into DB using a predefined connection.
----------------------------------------------------------------------------------------------------------
Flow :
MQ-Input Node :: Compute Node :: MQ-Output Node
:: MQ-Output1 Node
MQ-Input Node :- Process messages from Input queue from MQ
Compute Node :- Accesses the data from input message and compares the same with our strings using STARTSWITH, ENDSWITH and CONTAINS string manipulation functions in esql.
MQ-Output Node :- Places message in output queue.
MQ-Output1 Node:- Places exception message to exception queue.
----------------------------------------------------------------------------------------------------------
ESQL Code :
-------------------
DECLARE INPUT CHAR InputRoot.XMLNSC.InData;
DECLARE RESULT BOOLEAN ;
SET RESULT = STARTSWITH(INPUT, 'Inp');
-- starts with code part --
IF RESULT IS TRUE THEN
END IF;
-- ends with code part --
SET RESULT = ENDSWITH(INPUT, 'test');
IF RESULT IS TRUE THEN
END IF;
-- contains data code part --
SET RESULT = CONTAINS(INPUT, 'data');
IF RESULT IS TRUE THEN
END IF;
----------------------------------------------------------------------------------------------------------
Input Message :
-------------------
[InData]Input Data test[/InData]
----------------------------------------------------------------------------------------------------------
Рекомендации по теме