880-FIND-DBAGOF
Name
880-FIND-DBAGOF-<Index>
Description
The 880-FIND-DBAGOF-<Index> API is similar to the 880-FIND-DBAG-<Index> API, with the difference that it provides protection against putting overflow values into the field storing the result returned by the aggregate API. If the aggregate result is too large for the field it would be stored in, a flag is set indicating an overflow occurred. You can then add code to control what the program does in the event of an overflow.
Using the API in a Program
You use the 880-FIND-DBAGOF-<Index> API similarly to the 880-FIND-DBAG-<Index> API. For information on the latter, see 880-INIT and 880-FIND Aggregate Range APIs. The difference is that an overflow flag is set through the WS-DB-AGG-OVERFLOW field. You can check whether the value of this flag is "1" and, if it is, execute code that prevents updating the database with a value that is too large for the field it would be stored in.