Expressions and operators in REXX EXECs
All of the arithmetic, comparative and logical operators described in the IBM documentation TSO Extensions: REXX Reference guide are valid in a REXX EXEC expression that is running within
BMC AMI Ops Automation
.
An expression combines variables, whole numbers, and character strings with operators. For example, the following EXEC statement uses the comparative operator = in an expression with the REXX IF conditional statement to compare the first character of the character string in the Z1 symbol to the value in the CMD symbol:
The function SUBSTR is a built-in REXX function that replaces the function call with specific characters from a character string. The actual characters are selected by specifying a starting position and a length for the portion of the character string to be used.
In this example, SUBSTR is replaced with the first character of the character string substituted for the Z1 symbol.