Posted: Tue Oct 07, 2003 11:59 pm Post subject: MQ RFH2 Header
Disciple
Joined: 30 Oct 2002 Posts: 193 Location: France
Hi,
I have MRM TDS in Messages in my Flow and I want in error situation generate the exceptionList on the Message. My Idea is to paste the exception list on the RFH2 Header but what are the minimal ESQL instruction to generate the MQ RFH2 Header in a Comtupte node with the user tag ?
You can try the following piece of logic for populating exception data to MQRFH2 user variables.
-- PARSING THE SYSTEM GENERATED EXCEPTION LIST TO FIND THE DEEPEST EXCEPTION
-- DECLARE VARIABLES FOR CAPTURING EXCEPTION DATA
DECLARE Path CHARACTER;
-- Current path within the exception list
DECLARE ErrorLocation CHARACTER;
-- Application where the error occurred
DECLARE ErrorProcess CHARACTER;
-- Action being performed within the application when the error occurred
DECLARE ErrorCode INTEGER
-- The error reference number
DECLARE ErrorMessage CHARACTER;
-- The Error Message
DECLARE ErrorDateTime DateTime;
-- Time when error occurred
DECLARE ErrorLogId INTEGER
-- MQSeries Message Id
-- START AT FIRST CHILD OF THE LIST
SET Path = 'InputExceptionList. *[1]';
-- POPULATE ERROR DETAILS AVAILABLE FROM EXCEPTION LIST
LOOP through all the children
Check if the error attribute is available
SET <error variable declared above> TO <respective error attribute in exception list>
Repeat the above two steps for all the relevant error attributes available in exception list
END LOOP
-- POPULATE ERROR DETAILS AVAILABLE FROM MQMD HEADER
SET <error variable declared above> TO <respective attribute in MQMD>
Repeat the above step for all the relevant error attributes available in MQMD
-- POPULATE ERROR DATETIME
SET ErrorDateTime variable TO <Current DateTime>
-- MODIFYING MQRFH2 HEADER PROPERTIES WITH ERROR VARIABLES
SET OutputRoot.MQRFH2.usr.<PROPERTY> TO <error variables SET earlier>
Repeat the above step for all the relevant properties
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