Bytes assigned for COMP data
The COBOL Copybook Importer calculates COMP's item space using the Word-Storage Mode. Therefore, if you use the Byte-Storage Mode, you will have to manually change the type tree definitions in the type tree that is generated.
For example, if your data is PIC 9(5), the item in the generated type tree is assigned four bytes.
The following table shows how many bytes are required for each mode:
Digits (9s) Signed | Digits (9s) Unsigned | Bytes Assigned by Importer (Required for Word-Storage Mode) | Bytes Required for Byte-Storage Mode |
---|---|---|---|
1-2 | 1-2 | 2 | 1 |
3-4 | 3-4 | 2 | 2 |
5-6 | 5-7 | 4 | 3 |
7-9 | 8-9 | 4 | 4 |
10-11 | 10-12 | 8 | 5 |
12-14 | 13-14 | 8 | 6 |
15-16 | 15-16 | 8 | 7 |
17-18 | 17-18 | 8 | 8 |