Code ESQL statements to access the fields of the MQRFH2 header.
When you construct an MQRFH2 header in a Compute node, it includes two types of fields:
To differentiate between these two field types, insert a value in front of the referenced field in the MQRFH2 field to identify its type; a value for the NameValue buffer is not required because this is the default. The value that you specify for the header structure is (MQRFH2.Field).
For example:
SET OutputRoot.MQRFH2.(MQRFH2.Field)Format = 'MQSTR ';
SET OutputRoot.MQRFH2.psc.Topic = 'department';
DECLARE I INTEGER 1; DECLARE J INTEGER CARDINALITY(InputRoot.*[]); WHILE I < J DO SET OutputRoot.*[I] = InputRoot.*[I]; SET I=I+1; END WHILE; SET OutputRoot.MQRFH2.(MQRFH2.Field)Version = 2; SET OutputRoot.MQRFH2.(MQRFH2.Field)Format = 'MQSTR'; SET OutputRoot.MQRFH2.(MQRFH2.Field)NameValueCCSID = 1208; SET OutputRoot.MQRFH2.psc.Command = 'RegSub'; SET OutputRoot.MQRFH2.psc.Topic = "InputRoot"."MRM"."topel"; SET OutputRoot.MQRFH2.psc.QMgrName = 'DebugQM'; SET OutputRoot.MQRFH2.psc.QName = 'PUBOUT'; SET OutputRoot.MQRFH2.psc.RegOpt = 'PersAsPub';
WHILE I < CARDINALITY(InputRoot.*[]) DO
The MQRFH2 header can be parsed in either the MQRFH2 parser domain or the MQRFH2C compact parser domain. Use the MQRFH2C compact parser by selecting the Use MQRFH2C Compact Parser for MQRFH2 Domain check box on the input node of the message flow.