The definition of a function identifies the following:
- For alphanumeric functions, the size of the returned value
- For numeric and integer functions, the sign of the returned value and whether the function is an integer
- For some other cases, the value returned
Data item functions are elementary data items and return alphanumeric, numeric, or integer values. Data item functions are
treated as elementary data items and cannot be receiving operands. Types of data item functions are as follows:
- Alphanumeric functions - these are of the class and category alphanumeric. The number of character positions in this data
item is specified in the function definition. Alphanumeric functions have an implicit usage of DISPLAY.
- Numeric functions - these are of the class and category numeric. A numeric function is always considered to have an operational
sign.
- A numeric function may be used only in an arithmetic expression.
- A numeric function may not be referenced where an integer operand is required, even though a particular reference may yield
an integer value.
- Integer functions - these are of the class and category numeric. A numeric function is always considered to have an operational
sign.
- An integer function may be used only in an arithmetic expression.
- An integer function can be referenced where an integer operand is required and where a signed operand is allowed.