Cobol compute rounded option for the poor


Cobol compute rounded option for the poor


ADD A TO B GIVING C ROUNDED.Published by Asher Potter Modified 10 months ago. I am executing a standalone Enterprise COBOL program with the below calculation. I am having a COMPUTE with ffor operations and another with the full calculation split up. But the results are different(the last 4 digits) in both cases.I have manually calculated these using a calculator and the result matches the one with the poot up COMPUTE statements.

I have tried the calculations by using the entire cpbol at intermediate results and use only 15 digits of the final answer and also using only 15 digits at all intermediate steps(without rounding). A conforming implementation may truncate BEFOREtesting for ON SIZE ERROR or do just about anything they want. If WG4 were to approve the projectEmbed Code Embed Code Copied. All the basic arithmetic operations of ADD, SUBTRACT, MULTIPLY, and DIVIDE require that the fields operated on (operands): Have numeric PIC clauses.




Cobol compute rounded option for the poor

Cobol compute rounded option for the poor


Add a comment

Your e-mail will not be published. Required fields are marked *