Specifying a function
This topic describes the general format of a function-identifier.
- function-name-1
- function-name-1 must be one of the intrinsic function names.
- argument-1
- argument-1 must be an identifier,
a literal (other than a figurative constant), or an arithmetic expression
that satisfies the argument requirements for the specified function.
argument-1 cannot be a windowed date field, except in the UNDATE intrinsic function.
- reference-modifier
- Can be specified only for functions of type alphanumeric or national.
A function-identifier can be specified wherever a data item of the type of the function is allowed. The argument to a function can be any function or an expression containing a function, including another evaluation of the same function, whose result meets the requirements for the argument.
Within a PROCEDURE DIVISION statement, each function-identifier is evaluated at the same time as any reference modification or subscripting associated with an identifier in that same position would be evaluated.