Aligning numeric parameters on word and double-word boundaries to match the alignment in the non-COBOL program.
Restriction: The following applies to native COBOL only.
COBOL places no restrictions on the alignment of the addresses of data items, whereas in languages such as C and assembler, it is normal for numeric items to be aligned on word or double-word boundaries.
Make sure that you correctly align any numeric parameters that are not level-01 data items in the COBOL program, or that are in a parameter block passed as a single item.
To align numeric items, you can:
- Modify group items to include additional filler items.
- Use the ALIGN Compiler directive with a parameter that is a multiple of four. This aligns all level-01 and level-77 data items on double word boundaries. The Compiler uses ALIGN"8 OPT" by default.
- Use the SYNCHRONIZED clause in conjunction with the IBM COMP Compiler directive.