You are here: Commands > Else

Else

Use the Else command to provide an alternate set of commands when a Group If test fails in a conditional group. Else may also have its own condition. Else is only used within a Group, never on its own and is only available in a procedure. For each record in the file, the set of commands between Group and Else are processed if the Group test is met and the set of commands between Else and End are processed if the Group test fails and any Else test (if any) is met. Therefore only one set of commands is executed for each record.

For more detail, see Groups.

Parameters

The Else command has the following common command parameter: If. For a description, see Command Parameters.

Command Mode Syntax

ELSE <IF test>