SYNC Clause and Slack Bytes
Binary items that are aligned at natural storage boundaries might perform better than items that are not aligned. COBOL provides two alignment related features.
- SYNC clause
- This clause ensures that the item is placed at the next natural boundary, if applicable. The COBOL compiler achieves that by inserting slack bytes before the item.
- Top-level items
- The compiler always places top-level copybook items at a double-word (8-bytes) boundary. For example, if your copybook contains more than one item at the top level, then there might be a gap in front of the second and the following items:
Copyright © Cloud Software Group, Inc. All rights reserved.