Report writer can SUM large packed-decimal numbers incorrectly. The low-order digits are correct.
A reproducible case is attached. Linux-specific. Change the SELECT for other platforms.
The cause is in the cob_add_fields function in libcob/reportio.c.
Two temporary numeric fields are created for the values of the two operands. The temporary fields use the size (in bytes) of the operands for their size. Since the temporaries are not packed, they should use the number of digits instead of size or they will be too small when the operand is a large packed decimal value.
A patch for v3.2 is attached.