Within a procedure, you control exactly when G2 waits and allows other processing to occur. This differs from the way rules operate, because you cannot control when a rule waits for a value. As a result, you are guaranteed that G2 executes the tasks for a procedure without interruption, except where you indicate in the procedure that other processing can occur.
Because a procedure only waits at specific points, all of the expressions in it must have current values. Data-seeking implies waiting and allowing other processing to take place, so a procedure does not cause data-seeking unless you instruct it to do so by using a
collect data or wait statement. This is another difference between procedures and rules: rules automatically manage data collection and waiting for values, while procedures do not. The following table summarizes the major differences between procedures and rules:
The following table shows minor differences between procedures and rules that can cause trouble when they are written. Action buttons use the same syntax that rules do, so the table applies to them also.