$FldLen
The $FLDLEN function interprets its character string argument as a field name.
- In file context, $FLDLEN returns a number representing the LENGTH of the field if the field has a LENGTH attribute in its description. In file context, $FLDLEN returns 0 if the specified field does not have the LENGTH attribute in its description.
- In group context, $FLDLEN returns the minimum LENGTH specification included for all of the files. In group context, $FLDLEN returns 0 only if the field is described without a LENGTH attribute in every file in the group.
- If the field specified as the $FLDLEN argument is not defined in the current file or group, $FLDLEN returns a value of -1.
Example
$FLDLEN ('SOCSECNO')
equals 9 if the description of SOCSECNO for the file contains LENGTH 9.