Parameterized Commands with Intervening COMPUTE Commands
A typical parameterized shape APPEND command has a clause that creates a parent Recordset with a query command and another clause that creates a child Recordset with a parameterized query command—that is, a command containing a parameter placeholder (a question mark, "?"). The resulting shaped Recordset has two levels, in which the parent occupies the upper level and the child occupies the lower level.
The clause that creates the child Recordset may now be an arbitrary number of nested shape COMPUTE commands, where the most deeply nested command contains the parameterized query. The resulting shaped Recordset has multiple levels, in which the parent occupies the uppermost level, the child occupies the lowermost level, and an arbitrary number of Recordsets generated by the shape COMPUTE commands occupy the intervening levels.
The typical use for this feature is to invoke the aggregate function and grouping abilities of shape COMPUTE commands to create intervening Recordset objects with analytical information about the child Recordset. Furthermore, because this is a parameterized shape command, each time a chapter column of the parent is accessed, a new child Recordset may be retrieved. Because the intervening levels are derived from the child, they also will be recomputed.