Accessing the Properties tree

The Properties tree has its own correlation name, Properties, and you must use this in all ESQL statements that refer to or set the content of this tree.

About this task

The fields in the Properties tree contain values that define the characteristics of the message. For example, the Properties tree contains message template information for model-driven parsers, fields for the encoding and CCSID in which message data is encoded, and fields that hold the security identity of the message. For a full list of fields in this tree, see Data types for elements in the Properties subtree.

You can interrogate and update these fields using the appropriate ESQL statements. If you create a new output message in the Compute node, you must set values for the message properties.

Setting output message properties

About this task

If you use the Compute node to generate a new output message, you must set its properties in the Properties tree. The output message properties do not have to be the same as the input message properties.

For example, to set the output message properties for an output MRM message, set the following properties:

Property Value
MessageSet Message set identifier
MessageType Message name¹
MessageFormat Physical format name²
Notes:
  1. For details of the syntax of Message type, see Specifying namespaces in the Message property.
  2. The name that you specify for the physical format must match the name that you have defined for it. The default physical format names are Binary1, XML1, and Text1.

This ESQL procedure sets message properties to values passed in by the calling statement. You might find that you have to perform this task frequently, and you can use a procedure such as this in many different nodes and message flows. If you prefer, you can code ESQL that sets specific values.

CREATE PROCEDURE setMessageProperties(IN OutputRoot REFERENCE, IN setName char,
                 IN typeName char, IN formatName char) BEGIN
	/****************************************************************************
	* A procedure that sets the message properties
	****************************************************************************/
	set OutputRoot.Properties.MessageSet    = setName;
	set OutputRoot.Properties.MessageType   = typeName;
	set OutputRoot.Properties.MessageFormat = formatName;
END;

To set the output message domain, you can code ESQL statements that refer to the required domain in the second qualifier of the SET statement, the parser field. For example, the ESQL statement sets the domain to MRM:

SET OutputRoot.MRM.Field1 = 'field1 data';

This ESQL statement sets the domain to XMLNS:

SET OutputRoot.XMLNS.Field1 = 'field1 data';

Do not specify more than one domain in the ESQL for any single message. However, if you use PROPAGATE statements to generate several output messages, you can set a different domain for each message.

For information about the full list of elements in the Properties tree, see Data types for elements in the Properties subtree.

Differences exist in the way the Properties folder and the MQMD folder are treated with respect to which folder takes precedence for the same fields. For more information, see Properties versus MQMD folder behavior for various transports.