You can specify values by using arithmetic operations on numbers, comparisons, and logical operations. These operations are specified by an infix operator (which is an operator between operands), or by a prefix operator (which is an operator in front of operands).
The result is of the same type as the operand. The prefix plus (+) does not change its operand. The prefix minus (-) reverses the sign of its operand.
-DOWN_TIME +40 -23.456 -1E8
The result depends on the operand types:
A+B N_DATASETS-5 COUNT*1E-6 RESP_TIME/60
- If both operands are integers, the result is an integer. The operation is performed using integer arithmetic. The division is performed so that the remainder has the same sign as the dividend.
- If both operands are floating-point numbers, the result is a floating-point number. The operation is performed using long floating-point operations of S/390®.
- If one of the operands is an integer and the other a floating-point number, the integer is converted to a floating-point number. The operation is then performed on the result of the conversion, using floating-point arithmetic. The result is a floating-point number.
The result of dividing an integer by another integer is also an integer. For example, if
RESP_TIME is an integer less than 60, the result of
is 0. If you want the exact result, write
RESP_TIME/60.0 instead, which makes the
operand on the right the floating-point number 60.0. Then the operand on the left, which is
RESP_TIME, is converted to a floating-point number, making the result a
For all operators, the result is null if any of the operands is null. If the result is an integer, the result must be within the range of integers. If the result is a floating-point number, the result must be within the range of floating-point numbers. The operand on the right of a divide operator must not be 0.
Only the following types of comparisons are allowed:
A>10 JOB_NAME<'ABC' DATE<>'1993.04-15'
- Numbers with numbers
- Character strings with character strings or date and time values
- Date and time values with character strings or date and time values of the same type
Numbers are compared by their algebraic values. If both numbers are floating-point numbers, they are compared by using long floating-point operation of S/390. Two floating-point numbers are considered equal only if their normalized forms have identical bit configurations.
If one of the numbers is an integer number and the other a floating-point number, the integer number is converted to a floating-point number. The comparison is then performed with the result of the conversion.
Character strings are compared byte by byte, left to right. If the strings are different in length, the comparison is made with a temporary copy of the shorter string that is extended on the right with the necessary number of blanks so that it has the same length as the other string..
Two strings are equal if they are both empty or if all corresponding bytes are equal. Otherwise, their relation is determined by the comparison of the first unequal pair of bytes.
When a character string is compared with a date and time value, it must be a valid date and time string of the corresponding kind. The string is converted to a date and time value and the comparison is performed on the result.
All comparisons of date and time values are chronological. The value that represents the later point of time is considered to be greater.
INTERVALcalculates the interval between these timestamps as 10.
NOTto any value of true or false. The following table shows the result that is defined for operand
ORto any pair values of true or false. The following table shows the result that is defined for operand