The CORRESPONDING phrase (CORR) allows ADD, SUBTRACT, and MOVE operations to be performed on elementary data items of the same name if the group items to which they belong are specified.
Both identifiers following the keyword CORRESPONDING must be group items. In this discussion, these identifiers are referred to as identifier-1 and identifier-2.
However, identifier-1 and identifier-2 themselves may contain or be subordinate to items containing a REDEFINES or OCCURS clause in their descriptions.
05 ITEM-1 OCCURS 6 INDEXED BY X.
10 ITEM-A PIC S9(3).
10 ITEM-B PIC 99V9.
10 ITEM-C PIC X(4).
10 ITEM-D REDEFINES ITEM-C PIC 9(4).
10 ITEM-E PIC 9(4) USAGE COMP.
10 ITEM-F USAGE INDEX.
10 ITEM-G PIC X(4).
05 ITEM-2.
10 ITEM-A PIC 99.
10 ITEM-B PIC 9V9.
10 ITEM-C PIC A(4).
10 ITEM-D PIC 9(4).
10 ITEM-E PIC 9(9) USAGE COMP.
10 ITEM-F USAGE INDEX.
10 ITEM-G PIC X(4).
When you use the (default) *PRTCORR compiler option or the PRTCORR option of the PROCESS statement, the compiler inserts comment lines in the compiler listing after each statement that contains the CORRESPONDING phrase. These comment lines, which print immediately before the next valid source statement, identify the elementary items that are affected within the groups named.