ADS Reference Built-in Functions

This section contains the following topics:
idmscu
Built-in Functions
Built-in functions evaluate expressions according to predefined operations and return results that can be used in command processing. Built-in functions use a specified list of parameters, which are not changed by the execution of the function.
A built-in function can be used wherever the syntax for a variable expression specifies an arithmetic expression, the name of a user-defined data field, a user supplied numeric constant, a literal in quotes, or a string-variable.
Built-in Functions Supported
CA ADS supports the following types of built-in functions:
  • System-supplied functions
    that perform predefined arithmetic, date, string, and trigonometric operations. The built-in function names given in this documentation set are default invocation names that can be changed.
  • User-defined functions
    that perform site-specific functions defined by the installation.
User-defined and system-defined functions are described below, after a discussion of general considerations that apply to both types of built-in functions.
Invocation Names
A built-in function is invoked by means of a unique invocation name, such as CONCATENATE, CONCAT, or CON for the concatenate function.
Built-in function names are keywords. If an invocation name is the same name as a data field known to a dialog, an error occurs because CA ADS interprets the function invocation name as a subscripted reference to the data field.
An invocation name can be changed by modifying the internal table of invocation names (the master function table).
Built-in Function Values
Values are supplied to a built-in function according to Parameters that are coded along with the function's invocation name. Parameters can be either string values or numeric values, as follows:
  • A
    string value
    should be coded as an EBCDIC variable data field, a nonnumeric literal, or a built-in function that returns a string value. A value in a string built-in function cannot be zero in length and cannot be filled with only spaces.
  • A
    numeric value
    should be coded as an arithmetic expression, a numeric variable data field, a numeric literal, or a built-in function that returns a numeric value.
Some built-in function parameters have restrictions on the values they can contain. If an invalid value is specified at runtime, the dialog aborts. For example, the value specified in a square root function must be positive. If a parameter is specified with a different data type than expected, CA ADS attempts to make the appropriate conversion at runtime. The dialog aborts if the conversion cannot be made.
Coding Parameters
Parameters are coded within parentheses and separated by commas.
Each parameter must be coded in a specific position relative to the other parameters. When an optional parameter is not included in a parameter list, it must be replaced by the @ character unless no further parameters follow the optional parameter.