WHEN Statement
SYNTAX:
Â
when_stmt = when_clause BEGIN stmt { stmt } END ?;? .
The WHEN statement is similar to the IF statement. It defines the conditions under which a sequence of other statements should be executed.
The WHEN statement begins with a WHEN clause that is equivalent to the WHEN clause in the MAP and COMPOSE declaration, followed by the keyword BEGIN and a sequence of one or mores statements. These statements will be executed when the WHEN clause is evaluated to TRUE. The WHEN statement is ended with END.
Â
Example:
WHEN (Exists(s.complex_b1) AND (s.complex_b1.int_a1 > 100));
BEGIN
 t.int_v1 := s.complex_b1.int_a1;
 . . .
END;Â -- End of WHEN statement