COBOL data type definitions
Table 1 includes data type definitions and their descriptions for COBOL.
| Data type | Description | COBOL |
|---|---|---|
| INT2 | A 2-byte signed integer | PIC S9(4) USAGE IS BINARY |
| INT4 | A 4-byte signed integer | PIC S9(9) USAGE IS BINARY |
| FLOAT4 | A 4-byte single-precision floating-point number | COMP-1 |
| FLOAT8 | An 8-byte double-precision floating-point number | COMP-2 |
| FLOAT16 | A 16-byte extended-precision floating-point number | Not available |
| COMPLEX8 | Short floating-point complex hex number: an 8-byte complex number, whose real and imaginary parts are each 4-byte single-precision floating-point numbers | Not available |
| COMPLEX16 | Long floating-point complex hex number: a 16-byte complex number, whose real and imaginary parts are each 8-byte double-precision floating-point numbers | Not available |
| COMPLEX32 | Extended floating-point hex number: a 32-byte complex number, whose real and imaginary parts are each 16-byte extended-precision floating-point numbers | Not available |
| POINTER | A platform-dependent address pointer | USAGE IS POINTER |
| CHARn | A string (character array) of length n | PIC X(n) |
| VSTRING | A halfword length-prefixed character string (for input); fixed-length 80-character string (for output) | |
| FEED_BACK | A mapping of the condition token (fc) | |
| CEE_ENTRY | An HLL-dependent entry constant | USAGE IS PROCEDURE-POINTER |