There are two categories of ROLLBACK requests, those that can be evaluated by the parser and do not require access to a table and those that require table access.
If ROLLBACK expressions are processed that do not reference tables, and if their order of execution is not important relative to the other requests in a multistatement request or macro, then they should be placed ahead of any requests that reference tables so that the rollback operation can be done at minimum cost.
In the following example, the first two ROLLBACK requests can be evaluated by the parser and do not require access to tables. The third ROLLBACK request requires access to a table.
CREATE MACRO macro_name ( p1 INTEGER, p2 INTEGER) AS. . . ROLLBACK 'error' WHERE :p1 < 0; ROLLBACK 'error' WHERE :p2 < 0; SELECT. . . ROLLBACK 'error' WHERE tab.c1 = :p1;