Intervening Shape COMPUTE Clauses

It is valid to embed one or more COMPUTE clauses between the parent and child in a parameterized shape command, as in the following example:

SHAPE {select au_lname, state from authors} APPEND   
   ((SHAPE   
      (SHAPE   
         {select * from authors where state = ?} rs   
      COMPUTE rs, ANY(rs.state) state, ANY(rs.au_lname) au_lname   
      BY au_id) rs2   
   COMPUTE rs2, ANY(rs2.state) BY au_lname)   
RELATE state TO PARAMETER 0)  

See Also

Data Shaping Example
Formal Shape Grammar
Shape Commands in General