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