BINARY Directive

The BINARY directive is used to specify that the data in the field could be alphanumeric data of any classification. Absolutely any data is allowed.

The method of storing fields declared as binary is database-specific.

Syntax

$XFD BINARY

or

*(( XFD BINARY ))

Example

You might use this directive when you need to store a key that contains LOW-VALUES; COBOL allows a numeric field to contain LOW or HIGH values, but these are invalid for a numeric field in the RDBMS:

01  code-record.
  03  code-key.
    05  code-indic    pic x.
*(( XFD BINARY ))
    05  code-num      pic 9(5).
    05  code-suffix   pic x(3).
      .
      .
      .
move low-values to code-num.