COMPUTATIONAL-6 (COMP-6) Data Types

This COBOL system treats any COMP-6 data items in your RM/COBOL source program as the standard Micro Focus COBOL COMP format. If, as a result of this, less data space is allocated to each item than would be under the RM/COBOL system, this COBOL system pads the space with a byte containing a zero, as shown in the following table:

RM COMP-6 PICTURE clause Bytes allocated when converting to Micro Focus COBOL COMP PICTURE clause Number of bytes containing leading zeros required to precede COMP PICTURE clause
9(1) 1 NONE
9(2) 1 NONE
9(3) 2 NONE
9(4) 2 NONE
9(5) 3 NONE
9(6) 3 NONE
9(7) 4 NONE
9(8) 4 NONE
9(9) 5 NONE
9(10) 5 NONE
9(11) 5 1
9(12) 5 1
9(13) 6 1
9(14) 6 1
9(15) 7 1
9(16) 7 1
9(17) 8 1
9(18) 8 1

The padding byte precedes the converted field, and is therefore included in any redefinition of group fields which contain the converted field. However, the padding byte would not be included if you redefined only the converted field. If you wish to ensure that the padding byte is included in the redefinition of the converted field, you must add a field at a higher level immediately before the converted field, and redefine this new field instead.