Microsoft KB Archive/32484

COBOL 3.0 Data Types; DISPLAY, COMP, and COMP-X

PSS ID Number: Q32484 Article last modified on 04-21-1993

3.00 | 3.00 MS-DOS | OS/2

Summary: The following information describes data types used in COBOL Version 3.0 programs: 1. Display – ASCII Size: One byte per character PIC 99 VALUE 10. = 31 30 Hex. 2. COMP, COMP-X – Binary, most significant byte (MSB) first PIC 9(4) COMP VALUE 10. = 00 0A Hex. 3. COMP-5 – Intel binary PIC 9(4) COMP-5 VALUE 10. = 0A 00 Hex. 4. X – Alphanumeric, character Size: One byte per character PIC XXXX VALUE “THE”. = 54 48 45 Hex. 5. COMP-3 – Binary Coded Decimal (BCD) Size: One byte per two digits and a trailing sign nibble PIC 99 COMP-3 VALUE 10. = 01 0F Hex. For more information on data types, please refer to the “Microsoft COBOL Language Reference Manual” for Version 3.0, Chapter 2, “COBOL Concepts.”

Additional reference words: 3.00 Copyright Microsoft Corporation 1993.