It can be useful, during the runtime of your code, to have real-time 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 property 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 property, 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 property. To access the broker property, use the form SQL.<broker_property_name>. For example: SQL.BrokerName.
Broker properties that are accessible from ESQL and Java shows the broker, flow, and node properties that are accessible from ESQL and indicates which properties are also accessible from Java.