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

The Structure of Mapped Data Object (MDO) Variables
Working With Mapping Services
10–12 106160 Tandem Computers Incorporated
Figure 10-2. Header of an Element in an MDO Variable
len
4 byte
$MSG
(02)
4 byte
Element Length
Length of
Key Field
Element Key Value
Element Symbolic Name
Length
Field
Key
Field
Header
Length of
Length Field
004
The Length Field of an Element Header
The length field of an element in an MDO variable contains the length of the whole
element. The length may be fixed, in which case the length is always known, or it may
be variable. The length is fixed if there are no variable length structures in the
element. The length is variable if the element contains one or more variable length
structures. The letters "len" in Figure 10-2 indicate that the length of the MSGATTR
element in an MDO variable mapped by the map $MSG is variable.
The length of the length field itself is included in the length of an element. Figure 10-2
shows this is fixed at 2 bytes for the MSGATTR element in an MDO variable mapped
by the map $MSG.
When an MDO variable is created, Mapping Services automatically calculates the total
length of each element and places it in the length field of the element header.