Pathway/iTS SCREEN COBOL Reference Manual (G06.24+, H06.03+, Pathway/iTS 1.0+)
Data Division
Compaq NonStop™ Pathway/iTS SCREEN COBOL Reference Manual—426750-001
5-17
SYNCHRONIZED Clause
•
DISPLAY items are composed of one or more character positions and are stored as
an equal number of 8-bit bytes. The byte boundary is their natural storage
boundary; therefore, the SYNCHRONIZED clause has no effect on DISPLAY item
alignment.
•
COMPUTATIONAL items are stored as an even multiple of bytes. Their most
natural storage unit is some multiple of the 16-bit computer word; each of these
words contains two bytes. The SCREEN COBOL compiler automatically aligns
COMPUTATIONAL items to word boundaries. This is also the natural boundary
for small COMPUTATIONAL items (those items with PICTURE strings containing
up to four 9s).
•
Larger COMPUTATIONAL items (those items with pictures containing five or
more 9s) are naturally stored as one or two 32-bit doublewords. The
SYNCHRONIZED clause affects these items; it forces alignment on a doubleword
boundary.
•
All items of levels 01 and 77 in the Working-Storage Section and Linkage Section
are automatically allocated by the SCREEN COBOL compiler to begin on a word
boundary. The compiler treats these items as simultaneously beginning on a byte,
word, and doubleword boundary. Thus, each of these items is aligned to its most
natural storage boundary.
•
Words begin on two-byte boundaries; doublewords begin on four-byte boundaries.
Alignment, either automatic or as requested by use of the SYNCHRONIZED clause,
generates implicit FILLER data in some cases.
°
If an odd number of character positions precedes a word-aligned item within a
record, the compiler inserts one character position (byte) of FILLER data before
the item to complete allocation of the preceding word.
°
If the number of character positions preceding a doubleword aligned item within
a record is not a multiple of four, the compiler inserts FILLER data (1, 2, or 3
bytes) to complete allocation of the preceding doubleword. These extra bytes
are not part of the data item.
°
If a group item contains two items separated by implicit FILLER bytes, these
bytes are a part of that group item. A group item always begins with the first
character position of its first elementary item, however, ignoring any implicit
FILLER bytes that were generated to align that item properly. Thus, the initial
character positions of a group item are never implicit FILLER bytes.
•
Special considerations apply when aligning an elementary data item that is
described with an OCCURS clause, is subordinate to a group item described with an
OCCURS clause, or both. In these cases, all occurrences of the data item must be
aligned uniformly.
°
The first occurrence of the item is aligned to the required storage boundary (if
the elementary item also begins a containing table's first occurrence, that table's
first occurrence is defined to begin at the first character position of the item).
When the aligned item is itself a table, the first occurrence ends on the
appropriate storage boundary (byte, word, doubleword) and the remaining
occurrences follow without additional FILLER bytes.