The LENGTH-AN function returns an integer equal to the length of the argument in number of alphanumeric character positions.
The type of the function is integer.
General Format
Arguments
- Argument-1 may be a literal or data item of any class or category.
- If argument-1 or any data item subordinate to argument-1 is described with the DEPENDING phrase of the OCCURS clause, the contents of the data item referenced by the data-name specified in the DEPENDING phrase is used at the time the LENGTH-AN function is evaluated.
Returned Values
- If argument-1 is an elementary data item, the returned value is an integer equal to the length of argument-1 in alphanumeric character positions.
- If argument-1 is a group data item:
- If argument-1 or any data item subordinate to argument-1 is described with the DEPENDING phrase of the OCCURS clause, the returned value is an integer equal to the length of argument-1 in alphanumeric character positions, as a sending data item, determined by evaluation of the data item specified in the DEPENDING phrase in accordance with the rules of the OCCURS clause; otherwise the value returned is an integer equal to the length of argument-1 in alphanumeric character positions.
- The returned length includes the number of implicit FILLER positions, if any, in argument-1.