This example shows simple total processing.
Assume that you have a database file FILEA and decide to create file FINTOT for your final total record as follows:
|
OVRDBF FILE(FINTOT) TOFILE(FILEA) SHARE(*YES) OPNQRYF FILE(FILEA) FORMAT(FINTOT) + MAPFLD((COUNT '%COUNT') + (TOTAMT '%SUM(AMT)') (MAXAMT '%MAX(AMT)')) CALL PGM(PGMG) /* Created using file FINTOT as input */ CLOF OPNID(FILEA) DLTOVR FILE(FINTOT)