Then, if ADD CORR ITEM-2 TO ITEM-1(X) is specified, ITEM-A and ITEM-A(X),
ITEM-B and ITEM-B(X), and ITEM-E and ITEM-E(X) are considered to be
corresponding and are added together. ITEM-C and ITEM-C(X) are not
included because they are not numeric. ITEM-D and ITEM-D(X) are not
included because ITEM-D(X) includes a REDEFINES clause in its data
description. ITEM-F and ITEM-F(X) are not included because they are
defined as USAGE IS INDEX. Note that ITEM-1 is valid as either
identifier-1 or identifier-2.
If any of the individual operations in the ADD CORRESPONDING statement
produces a size error condition, imperative-statement-1 in the ON SIZE
ERROR phrase is not executed until all of the individual additions are
In the MOVE CORRESPONDING you specify two group items as in the example below. The elemental items within the group item are ?CORRESPONDING?, basically, if the names are the same. Check the documentation for the exact CORRESPONDING rules.
MOVE CORRESPONDING GROUP-A TO GROUP-B.
Is equivalent to:
MOVE A OF GROUP-A TO A OF GROUP-B.
MOVE B OF GROUP-A TO B OF GROUP-B.
MOVE E OF GROUP-A TO E OF GROUP-B.
In the example above, when you do the MOVE CORRESPONDING GROUP-A to GROUP-B, nothing will be moved to D of GROUP-A because there is no ?CORRESPONDING? name in GROUP-B, and C of GROUP-B will not be moved because there is no ?CORRESPONDING? name in GROUP-A.