Use of the CAT keyword to concatenate lists

Use the CAT keyword to concatenate data in an eval statement.

Syntax

The following syntax shows how to use the CAT keyword.

CAT( comma separated list of items to be concatenated )

Any of the following items can be concatenated together:

  • A reference to a database record (preceded by the appropriate number of ampersands).
  • A reference to a system or Network Manager variable.
  • A text string enclosed within single straight back quotes, for example, ‘item‘.

Example 1

The following example shows how to format the list of items to be concatenated:

eval( text, 'CAT(‘UNCONNECTED_NODES / ‘,&m_Subnet,‘ / ‘,&m_SubnetMask)' )

If m_Subnet='172.16.2.0' and m_SubnetMask='255.255.255.0', the above syntax would evaluate to the following text string:

UNCONNECTED_NODES / 172.16.2.0 / 255.255.255.0

Example 2

In the following example, the target identifier extracts the value of a varbind within an object.

eval( text, 'CAT( &m_Name,‘[ ‘,&m_LocalNbr->m_IfIndex,‘ ]‘ )' )

If the value specified for m_Name is 172.16.1.239 and the value specified for m_IfIndex is 63, the result is the following string.

172.16.1.239[ 63 ]