It can be useful, during the runtime of your code, to have realtime access to details of a specific node, flow, or broker. For an overview of broker properties, see Broker properties.
DECLARE mybroker CHARACTER; SET mybroker = BrokerName;where BrokerName is the broker attribute that contains the broker's name. However, you cannot use broker properties on the left-hand side of SET statements. This is because, at runtime, broker properties are constants: they cannot be assigned to, and so their values cannot be changed by SET statements. If a program tries to change the value of a broker attribute, the error message Cannot assign to a symbolic constant is issued.
If your ESQL code already contains a variable with the same name as one of the broker properties, your variable takes precedence; that is, your variable masks the broker attribute. To access the broker attribute, use the form SQL.<broker_attribute_name>. For example: SQL.BrokerName.
Table 1 shows the broker, flow, and node properties that are accessible from ESQL. The table's fourth column indicates whether the properties are also accessible from Java.