Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

Condition-name condition

Function

The condition-name condition causes a conditional variable to be tested to determine whether or not its value is equal to one of the values associated with a specified condition-name. (See section "VALUE clause").

Format


condition-name


Syntax rules

  1. condition-name specifies the condition-name to be used in the test.

  2. If a condition-name is associated with a single value, then the related test is true, only if the value corresponding to the condition-name equals the value of its associated conditional variable.

  3. If the condition-name is associated with one or more ranges of values, then the conditional variable is tested to determine whether or not its value falls in the range, including the end values.

  4. The condition-name condition is a shorthand form of the relation condition (see "Example 8-4").
    See also “Format 4” in section "SET statement".

Example 8-4

    02  PAY-CLASS PICTURE  9.
        88  HOURLY   VALUE 1.
        88  WEEKLY   VALUE 2.
        88  MONTHLY  VALUE 3.
             ...
        IF  HOURLY GO TO HOUR-PROCEDURE.

Here, PAY-CLASS is a conditional variable, and HOURLY, WEEKLY, and MONTHLY are condition-names. If the current value of PAY-CLASS is 1, the result of the test in the IF statement is true. Otherwise, the result is false.

As noted above, the condition-name is a shorthand form of the relation condition. The following statement, which contains a relation condition, is equivalent to the above IF statement:

    IF PAY-CLASS = 1 GO TO HOUR-PROZEDUR.