Skip to main content

This article explains alignment in COBOL when using the EXTERNAL and SYNC clauses.

Problem:

What address is set to the data item in runtime if the SYNC clause is specified in 32 bit and 64 bit mode: a multiple of 2 bytes, multiple of 4 or multiple of 8?

Does this depend on the data item being EXTERNAL?

Resolution:

There is no guarantee about the alignment of external items. Generally, there are 4 byte aligned in 32 bit mode and 8 byte aligned in 64 bit mode.

The sync phrase is documented in the Language Reference Manual. Sync only has an effect when the directive IBMCOMP is also on.

Old KB# 14615