Previous Topic: UPDATE

Next Topic: WRITE

WHEN

WHEN conditional-clause USE table-name.    

The WHEN statement can be used on READ/SCAN/EQUI-JOIN to further qualify a record for selection by testing any field in the record for specific criteria. The WHEN does not fall through until the logic operation is true. If the WHEN is used with a READ EQ and the WHEN test fails, the NOT-FOUND option will be activated. If it is used with a SCAN, and is false, the WHEN automatically branches back to the first paragraph name prior to the WHEN.

See the "Using Conditional Expressions" chapter of the CA-Datamacs/II Reference Guide for details on conditional-clauses.