DB2 graphic  QMF Version 8

@IF function

The REXX @IF function is used to test for specific values within a REXX expression and then interpret the associated REXX expressions and return the results.

The @IF function can be used anywhere a REXX expression may be entered. REXX expressions can be used in FORM.CALC, FORM.CONDITIONS and FORM.COLUMNS (Column Definition)

Read syntax diagramSkip visual syntax diagram           .-+---+-----------------------------------.
           | '-,-'                                   |
           V              (1)                   (2)  |
>>-@IF--(----comparison_1-------,--expression_1------+---------->

                   (3)
>--,--expression_N-------)-------------------------------------><

Notes:
  1. A valid REXX expression that can be reduced to a 0 or 1. Typically contains a REXX comparative operator. The @IF function tests the comparison and if the result is 1, the following expression is evaluated and the results are returned. The @IF function evaluates the comparisons left to right until a true comparison is found. If no comparsions are found to be true, then the last expression is interpreted and the results are returned.
  2. A valid REXX expression consisting of terms (strings, symbols, and functions) interspersed with operators and parenthesis. If the preceding comparison is true, the expression is interpreted and the results are returned.
  3. A valid REXX expression as defined above. If no comparisons are true, then expression_N is interpreted and he results are returned.

Notes on the @IF function:


Go to the previous page Go to the next page

Downloads | Library | Support | Support Policy | Terms of use | Feedback
Copyright IBM Corporation 1982,2004 Copyright IBM Corporation 1982, 2004
timestamp Last updated: March, 2004