You are here: Commands > Group > Command Mode Syntax

Command Mode Syntax

Each Group command must be closed with an End command. Within a group, you can specify If or While parameters to test for a condition and Else to specify what happens to records that do not meet the condition.

Note: It is considered good style to indent commands in a group. Although not required, it helps to identify where a group starts and ends.

GROUP <IF test> <WHILE test> <FIRST|NEXT range>¿

commands¿

...¿

<ELSE> <IF test>¿

commands¿

...¿

END¿

You can also include a Loop command within a group when you need to execute a series of commands more than once against repeating information in a particular record. The Loop command behaves similarly to the Group command, except that the commands between Loop and End are executed repeatedly against the current record until the result of the test is false. For more information, see Loop.