Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

7.45.3 ENDCHECK Examples

Example 1: Request that the user input a product number, an order number, and a quantity then perform validation checks against the fields:

...

Code Block
REQUEST     FIELDS(#FIELD01) <-----------------------------
 IF         COND('#FIELD01 *LT 10')                        |
            REQUEST     FIELDS(#FIELD02) <------------     |
            BEGINCHECK                                |    |
            RANGECHECK  FIELD(#FIELD01) RANGE(5 9)    |    |
            RANGECHECK  FIELD(#FIELD02) RANGE(10 20)  |    |
            ENDCHECK ---------------------------------     |
 ELSE                                                      |
            BEGINCHECK                                     |
            RANGECHECK  FIELD(#FIELD01) RANGE(15 19)       |
            ENDCHECK --------------------------------------
 ENDIF

The arrows indicate where control is passed if either of the ENDCHECK commands find a validation error in their respective validation blocks.

...