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–23
A group may have a fixed length or a variable length. A variable length group extends
to the end of the group in which it is enclosed, or, if it is an outermost group, to the
end of the element in which it is defined.
Fields in Elements
A field is the most fundamental unit of an MDO variable. Fields contain the basic
units of meaningful data in an MDO variable.
The start of a field has a fixed offset in a group and consists of a sequence of
contiguous bytes within that group. A field can be fixed or variable in length. It
extends to the end of the current group, as described previously for groups.
Note Data assigned to a fixed length field is truncated if it exceeds the length of the field.
Offsets begin from 0 (zero). Figure 10-3 shows that value of COLOR in the element
DISPLAY begins at offset 0. However, the value of COLOR in the element FLD begins
at offset 4 because the value of the fields OFFSET and LENGTH are 2 bytes each.
Note the difference between fields and groups. A group is a structure that can contain
other groups or fields. A field cannot contain other fields (or groups). Other than this
distinction, groups and fields are processed in exactly the same way by Mapping
Services.
Fields have symbolic names, which must be unique among other field names at the
same hierarchical level. You use these names to refer to the data defined within the
field. The following examples refer to fields in the element MSGATTR:
&$EMS.MSGATTR.DISPLAY.COLOR /* Base COLOR field */
&$EMS.MSGATTR.DISPLAY.HLITE /* Base HLITE field */
&$EMS.MSGATTR.DISPLAY.INTENS /* Base INTENS field */
&$INT.MSGATTR.FLD{1}.OFFSET /* 1st OFFSET field */
&$INT.MSGATTR.FLD{1}.LENGTH /* 1st LENGTH field */
&$INT.MSGATTR.FLD{1}.COLOR /* 1st COLOR field */
&$INT.MSGATTR.FLD{1}.HLITE /* 1st HLITE field */
&$INT.MSGATTR.FLD{1}.INTENS /* 1st INTENS field */
&$MSG.MSGATTR.FLD{2}.OFFSET /* 2nd OFFSET field */
&$MSG.MSGATTR.FLD{2}.LENGTH /* 2nd LENGTH field */
&$MSG.MSGATTR.FLD{2}.COLOR /* 2nd COLOR field */
&$MSG.MSGATTR.FLD{2}.HLITE /* 2nd HLITE field */
&$MSG.MSGATTR.FLD{2}.INTENS /* 2nd INTENS field */