COBOL argument values

In COBOL, you can use any data name of the correct data type for any argument. For a data-value, you can also use a constant that can be converted to the correct type.

The ADDRESS special register can be used for both pointer-references and pointer-values, and the LENGTH special register can be used for length arguments that take a data-value. The table that follows indicates how to define the correct data type.

Data type COBOL definition
Halfword binary PIC S9(4) COMP
Fullword binary (including CVDA) PIC S9(8) COMP
Doubleword binary PIC S9(18) COMP
Pointer USAGE IS POINTER
Character string (n characters long) PIC X(n)
UTF-8 character string (n bytes long) PIC X(n)
Packed decimal (n decimal digits) PIC S9(n) COMP-3