COMMON RULES CONCERNING CORRESPONDING OPTION:
Let us consider the DATA DIVISION entries as shown below.
Now, let us see which data items will be moved if the PROCEDURE DIVISION holds the statement MOVE CORRESPONDING OLD-REC TO NEW-REC. The data items are ITEM-1, ITEM-2, ITEM-3 & SEC-1. Note that the SEC-21, THIRD-1 and THIRD-2 cannot take part in the operation. This is as although those names are common to both the groups, and their qualifiers are different. When, on the other hand, the PROCEDURE DIVISION statement is ADD CORRESPONDING OLD-REC TO NEW-REC, only the ITEM-1 and ITEM-2 will take part in the add operation. This is as the ITEM-3 and SEC-1 in NEW-REC are not numeric data items.