The following COBOL data description will produce the computer storage
allocation shown in
Figure 1.
01 UNSYNCHRONIZED-RECORD
02 UNSYNCHRONIZED-DATA-1 PIC 9(3) DISPLAY.
02 UNSYNCHRONIZED-DATA-2 PIC X(2).
01 COMPOUND-REPEATED-RECORD.
02 ELEMENTARY-ITEM-1 PIC X (2).
02 GROUP-ITEM OCCURS 3 TIMES.
03 ELEMENTARY-ITEM-2 PIC X.
03 ELEMENTARY-ITEM-3 PIC S9(2) BINARY SYNC.
03 ELEMENTARY-ITEM-4 PIC S9(4) V9(2) BINARY SYNC.
03 ELEMENTARY-ITEM-5 PIC X (5).
Figure 1. Computer Storage Allocation
- @
- Indicates implicit FILLER bytes allocated because of automatic synchronization
or a record (01-level) description
- #
- Indicates implicit FILLER bytes allocated when the following data item
is explicitly synchronized
- *
- The first byte of a BINARY item that has been synchronized
- $
- Indicates implicit FILLER bytes allocated when a non-elementary item
is subject to an OCCURS clause
- 9
- Indicates bytes allocated for a numeric DISPLAY character
- X
- Indicates bytes allocated for an alphanumeric DISPLAY character
- C
- Indicates bytes allocated for a BINARY data storage