Simple computational logic can be achieved using value assignments and arithmetic expressions.
In addition, the following logic commands are also available for computation:
Note: For MCP based systems, precision may be lost when a number with more than 17 decimal places is used with any of these verbs: Add, Compute, Divide, Multiply, and Subtract. This is a known issue with the MCP COBOL85 compiler. Use ROUNDED with the verb to round the result of an operation so that it fits into the receiving variable. Refer to the ClearPath Enterprise Servers COBOL ANSI-85 Programming Reference Manual Volume 1, Section 5. General Rules for Arithmetic Statements for more information.
The following built-in method can also be used for computation: