Using the APIs in a Program
You can use the aggregate range routines whenever you would otherwise use 850-FIND-SUBRNG-<Index> and 860-FIND-NXTRNG-<Index> to access a set of rows for the purpose of applying average, maximum, minimum, or sum functions against a column.
Use the 880-INIT-DBAG-<Index> routine to initialize an aggregation request.
Use the 880-CALC-DBAG-<Index> routine to process an aggregation request against a data set.
The database routines perform an equal condition on all DB
Index fields up to the subrange field designated in
the WS-DB-SUB-RNG
. It performs a
"where greater-than and less-than" condition on this index
field.