Previous Topic Next topic Print topic


MF 

The LENGTH-AN Function

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

  1. Argument-1 may be a literal or data item of any class or category.
  2. 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

  1. 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.
  2. If argument-1 is a group data item:
    1. 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.
    2. The returned length includes the number of implicit FILLER positions, if any, in argument-1.
Previous Topic Next topic Print topic