The SYNCHRONIZED clause specifies the alignment of an elementary item on the natural boundaries of the computer memory.
Although it is a part of the standard COBOL definition, this feature is explicitly excluded from the X/Open COBOL language
definitions and should not be used in a conforming X/Open COBOL source program.
- In addition to Compiler directives which provide flagging and modify the reserved word list, the following directive may impact
either the syntax or the semantics described in this section.
- IBMCOMP - When NOIBMCOMP is specified, the SYNCHRONIZED clause is treated as documentary only.
- This clause should appear only with an elementary item.
The SYNCHRONIZED clause can appear with a non-elementary item.
- SYNC is an abbreviation for SYNCHRONIZED.
- SYNCHRONIZED RIGHT specifies that the elementary item is to be positioned so that it terminates on the right character position
of the natural boundary in which the elementary item is placed.
It takes effect only if the IBMCOMP Compiler directive is set.
- Specification of the LEFT phrase in the SYNCHRONIZED clause has no effect.
- The effect of the SYNCHRONIZED clause is, by definition, implementation-dependent.
- This clause specifies that the subject data item is to be aligned in the computer so that no other data item occupies any
of the character positions between the leftmost and rightmost natural boundaries of the computer memory which delimits this
If the number of character positions required to store this data item is less than the number of character positions between
those natural boundaries, the unused character positions (or portions thereof) must not be used for any other data item. Such
unused character positions are, however, included in:
- The size of any group item(s) to which the elementary item belongs, and:
- The character positions redefined when this data item is the object of a REDEFINES clause.
Thus the size of an elementary item is unchanged by the SYNCHRONIZED clause, but extra character positions are assigned by
the use of the clause.
- SYNCHRONIZED not followed by either RIGHT or LEFT specifies that the elementary item is to be positioned between natural boundaries
so that it uses the elementary data item efficiently.
- Whenever a SYNCHRONIZED item is referenced , the original size of the item, as shown in the PICTURE clause, is used in determining
any action that depends on size, such as justification, truncation or overflow.
- If the data description of an item contains the SYNCHRONIZED clause and an operational sign, the sign of the item appears
in the normal operational sign position, regardless of whether the item is SYNCHRONIZED LEFT or SYNCHRONIZED RIGHT.
- When the SYNCHRONIZED clause is specified in a data description entry of a data item that also contains an OCCURS clause,
or in a data description entry of a data item subordinate to a data description entry that contains an OCCURS clause, then:
- Each occurrence of the data item is SYNCHRONIZED.
- Any implicit FILLER generated for other data items within that same table is generated for each occurrence of those data items.
- If the SYNCHRONIZED clause is specified with a non-elementary item, then the clause applies to all the items subordinate to
that non-elementary item.
- The effect of using the SYNCHRONIZED clause is discussed in the topic Selection of Character Representation and Radix in the chapter Concepts of the COBOL Language.