NET/MASTER Network Control Language (NCL) Programmer's Guide

The Structure of Mapped Data Object (MDO) Variables
Working With Mapping Services
106160 Tandem Computers Incorporated 10–19
Each element inside an enclosing element is interpreted as another element. It has a
symbolic name provided by the map that is used to interpret it. Symbolic names
among elements at the same level must be unique.
Since elements are hierarchical and symbolic names are unique at the same level, you
can uniquely identify and refer to an enclosed element from an NCL procedure. To do
so, you must name all intermediate elements in the hierarchy, as the following
examples show:
&$EMS.MSGATTR /* Refers to MSGATTR element */
&$INT.MSGATTR.DISPLAY /* Refers to DISPLAY element */
&$LOG.MSGATTR.FLD /* Refers to FLD element */
&$MSG.MSGATTR.MSGCODE /* Refers to MSGCODE element */
Repeated Elements
Some elements can be repeated. An element that can be repeated is called a repeated
element. Figure 10-3 shows that the FLD element in an MDO variable mapped by the
map $MSG is a repeated element.
Figure 10-4 shows part of the hierarchy of the map $MSG.
Figure 10-4. Part of the Hierarchy of $MSG
TEXT
$MSG
PREFIX DOMIDMSGATTR
DISPLAY
FLD
FLD
• •
SEVERITY
MSGCODE CLASS
ALARM
FLAGS
007
Note The main display attributes of the text of a message are stored in the DISPLAY element of an MDO
variable. The FLD element is used to assign different attributes to parts of the text. If the entire text of a
message has the same display attributes, the FLD element is not present in the MDO variable.
When you are referring to a repeated element from NCL, you must use an integer
index to uniquely identify the specific instance of the repeated element. An integer
index is a number, or an expression that resolves to a number, enclosed in braces and
placed after the symbolic name of an element. The value of the integer index indicates
the occurrence of the element to which you want to refer.