Using LENGTH or ILENGTH
If your DATA or IDATA field contains a character string, you must
specify a value for LENGTH. If you specify LENGTH=0
,
LENGTH is automatically set to the maximum length of the string. The
DATA or IDATA field might contain a literal character string or a
character string that is derived from a character variable of CHAR
or VARCHAR data type. This provides a method to determine the length
of a string in the DATA or IDATA field dynamically.
If a DESCRIBE statement precedes a GET DESCRIPTOR statement, LENGTH is automatically set to the maximum length of the character field that is specified in your table.
This information is identical for ILENGTH. Use ILENGTH when you create a dynamic program that does not comply with the X/Open standard.