z/OS TSO/E REXX Reference
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


NUMERIC

z/OS TSO/E REXX Reference
SA32-0972-00

Read syntax diagramSkip visual syntax diagram
>>-NUMERIC--+-DIGITS-+-------------+---------+--;--------------><
            |        '-expression1-'         |      
            |      .-SCIENTIFIC------------. |      
            +-FORM-+-----------------------+-+      
            |      +-ENGINEERING-----------+ |      
            |      '-+-------+-expression2-' |      
            |        '-VALUE-'               |      
            '-FUZZ-+-------------+-----------'      
                   '-expression3-'                  

NUMERIC changes the way in which a program carries out arithmetic operations. See Numbers and arithmetic-Errors for the options of this instruction, but in summary:

NUMERIC DIGITS
controls the precision to which arithmetic operations and arithmetic built-in functions are evaluated. If you omit expression1, the precision defaults to 9 digits. Otherwise, expression1 must evaluate to a positive whole number and must be larger than the current NUMERIC FUZZ setting.

There is no limit to the value for DIGITS (except the amount of storage available), but note that high precisions are likely to require a good deal of processing time. It is suggested that you use the default value wherever possible.

You can retrieve the current NUMERIC DIGITS setting with the DIGITS built-in function. See DIGITS.

NUMERIC FORM
controls which form of exponential notation REXX uses for the result of arithmetic operations and arithmetic built-in functions. This may be either SCIENTIFIC (in which case only one, nonzero digit appears before the decimal point) or ENGINEERING (in which case the power of 10 is always a multiple of 3). The default is SCIENTIFIC. The subkeywords SCIENTIFIC or ENGINEERING set the FORM directly, or it is taken from the result of evaluating the expression (expression2) that follows VALUE. The result in this case must be either SCIENTIFIC or ENGINEERING. You can omit the subkeyword VALUE if expression2 does not begin with a symbol or a literal string (that is, if it starts with a special character, such as an operator character or parenthesis).

You can retrieve the current NUMERIC FORM setting with the FORM built-in function. See FORM.

NUMERIC FUZZ
controls how many digits, at full precision, are ignored during a numeric comparison operation. (See Numeric comparisons.) If you omit expression3, the default is 0 digits. Otherwise, expression3 must evaluate to 0 or a positive whole number, rounded if necessary according to the current NUMERIC DIGITS setting, and must be smaller than the current NUMERIC DIGITS setting.

NUMERIC FUZZ temporarily reduces the value of NUMERIC DIGITS by the NUMERIC FUZZ value during every numeric comparison. The numbers are subtracted under a precision of DIGITS minus FUZZ digits during the comparison and are then compared with 0.

You can retrieve the current NUMERIC FUZZ setting with the FUZZ built-in function. See FUZZ.

The three numeric settings are automatically saved across internal and external subroutine and function calls. See CALL for more details about the CALL instruction.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014