ILE COBOL Programmer's Guide

Floating-point Fields

You can bring internal floating-point fields into your program if you specify *FLOAT on the CVTOPT parameter of the CRTCBLMOD or CRTBNDCBL commands, or the FLOAT option on the PROCESS statement.

When *FLOAT is specified, floating-point data types are brought into the program with their DDS names and a USAGE of COMP-1 (single-precision) or COMP-2 (double-precision). If you do not specify *FLOAT, floating-point data types are declared as FILLER fields with a USAGE of binary.

For example, if you specify *FLOAT for a single-precision floating-point field with the following DDS:

  COMP1          9F         FLTPCN(*SINGLE)

the data item brought into the program is:

  06  COMP1               COMP-1.

If you do not specify *FLOAT (or you specify *NOFLOAT) for the DDS specified above, the DDS field will be generated as follows:

  06  FILLER      PIC 9(5)        COMP-4.

In general, floating-point data items can be used anywhere numeric decimal are used.


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]