$FldLen

From m204wiki
Revision as of 17:44, 21 July 2014 by Mlarocca (talk | contribs) (Mlarocca moved page $FLDLEN to $FldLen: Lower case change)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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.