Determining the Decimal Places

To determine the number of decimals for a type P field, you use the DECIMALS parameter with the DESCRIBE FIELD statement as follows:

Syntax

DESCRIBE FIELD <f> DECIMALS <d>.

The system reads the number of decimals of the field <f> and writes the value to the field <d> .

DATA: PACK TYPE P DECIMALS 2, DEC.

DESCRIBE FIELD PACK DECIMALS DEC.

This example results in field DEC containing the value 2.