COBOL has its own rules for calculations that are hard to replicate in newer systems. We have seen thousands of different examples where the customer is unable to match mainframe-based calculations in the new system.
Consider a simple calculation in COBOL.
"COMPUTE VAR-1 ROUNDED = ((VAR-2 * VAR-3 ) / 100 ) * (2 / 3 )" Result: -65027221.2646
Where
05 VAR-1 PIC -(8)9.9(4).
05 VAR-2 PIC S9(9)V9(4) COMP-3. VAR-2 = -987653.1200
05 VAR-3 PIC S9(4)V9(4) COMP-3. VAR-3 = 9876.1200
Using a calculator
Result: -65027871.5433
Using ChatGPT to convert to Java
Result: VAR-1 (After Compute) = -65027871.5433
Summary
The examples above demonstrate the difficulty of matching COBOL calculations with a calculator, handwritten Java or the use of AI. An intimate knowledge of the rules is necessary. Or you could simplify the process by using CloudFrame!