Expressions

An expression is a group of constants or variables, separated by operators, that produces a single value.

The operators specify how the values are combined to produce the single value or result. The types of expressions are arithmetic, character string, relational, and logical. An expression can be used as a value for a CL command parameter only in CL source programs.

The operators can be arithmetic, character string, relational, or logical. The constants or variables can be character, decimal, integer, or logical. For example, the expression (&A + 1) specifies that the result of adding 1 to the value in the variable &A is used in place of the expression.

Character string expressions can be used in certain command parameters defined with EXPR(*YES) in CL programs. An expression can contain the built-in functions %BINARY (or %BIN), %SUBSTRING (or %SST), and %SWITCH. The types of expressions and examples of each are described there.