Special Considerations for Expandable Groups

Expandable groups may be defined as follows:

GROUP_BY   NAMED(#XG_CUST) FIELDS(#CUSTNO #CUSTNM #ADDR1 #ADDR2

                                  #POSTCD)

GROUP_BY   NAMED(#XG_PRKY) FIELDS(#GROUP #PRODNO)

GROUP_BY   NAMED(#XG_PROD) FIELDS(#XG_PRKY #DESC #CLASS #PRICE

                                  #BARCOD)

GROUP_BY   NAMED(#XG_ORD)  FIELDS(#XG_CUST #XG_PROD)

and then used like this:

FETCH      FIELDS(#XG_CUST) FROM_FILE(CUSMST)

FETCH      FIELDS(#XG_PROD) FROM_FILE(PRDMST) WITH_KEY(#XG_PRKY)

DISPLAY    FIELDS(#XG_ORD)