INTEREST
interest.cbl (COBOL) → Java 21 (BigDecimal translation)
Not equivalent
The new code does not behave like the original yet. Tested on 20,000 cases, 23 Sept 2026.
12
to decide
0
kept, fix pending
0
accepted changes
20/20
COBOL lines tested
Needs decisionMinus sign lost
NEW-BAL silently drops negative signs
NEW-BAL is declared PIC 9(7)V99 (UNSIGNED, 7 integer digits, 2 decimals). When a result is negative, the legacy program stores its absolute value. Legacy: 0000012.50. Modern: -0000012.50. A negative becomes a positive — a debt becomes a credit.
Happens in 7,086 of 20,000 test cases (35%).
Simplest example
InputF-TYPE SBALANCE 0.00RATE 0.0000DAYS 0
| Output | Old COBOL system | New Java system |
|---|---|---|
| O-INT | 00000.00 | 00000.00 |
| O-FEE | 012.50 | 012.50 |
| O-NEW | 0000012.50 | -0000012.50 |
Where it comes from in the COBOL
2401 NEW-BAL PIC 9(7)V99.← the field55COMPUTE NEW-BAL = BALANCE + INTEREST - FEE← stored here
Your decision