In this topic, we described about the Statement Operations with detailed example.
COBOL statements perform the following types of operations -
- Data manipulation
- Procedure branching
The below phrases are common to arithmetic and data manipulation statements -
- CORRESPONDING phrase - The CORRESPONDING (CORR) phrase come up with ADD, SUBTRACT and MOVE operations.
The CORRESPONDING phase used to perform the above operations on same named elementary data items from two different group items.
- GIVING phrase - GIVING phase meaning changed by the place of usage.
- ROUNDED phrase - ROUNDED option used to round the fraction result of the compute statement exceeds the length of the target data item fractional places.
- SIZE ERROR phrase - A size error condition can occur When the result value of an arithmetic expression, exceeds the largest value that can be contained in the result field or when division by zero occurs or when the year of the arithmetic statement result falls outside the century window or when an expression contains Zero raised to zero power, Zero raised to a negative number, A negative number raised to a fractional power.