Determining the Field Length

To determine the length of a data object, you use the LENGTH parameter with the DESCRIBE FIELD statement as follows:

Syntax

DESCRIBE FIELD <f> LENGTH <l>.

The system reads the length of the field <f> and writes the value to the field <l> .

DATA: TEXT(8), LEN TYPE I.
DESCRIBE FIELD TEXT LENGTH LEN.

In this example, the field LEN contains the value 8.