In this topic, we described about the CORRESPONDING Phrase with detailed example.
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.
Both identifiers that follow the CORRESPONDING keyword must be group items. Identifier-1 references the sending group item. Identifier-2 references the receiving group item.Identifier-1, identifier-2 or both can be subordinate to a FILLER item.
- In an ADD or SUBTRACT statement, both data items are elementary numeric data items. Other data items are ignored.
- In a MOVE statement, at least one of the data items is an elementary item.
- The two elementary items should have the same name and the same qualifiers.
- The elementary items are not identified by the keyword FILLER.
- Neither identifier-1 nor identifier-2 is defined as a level 66, 77 or 88 items.
- Neither identifier-1 nor identifier-2 can be reference-modified.
- The elementary items do not include a REDEFINES, RENAMES or OCCURS clause in their definitions. However, identifier-1 and identifier-2 themselves can contain a REDEFINES or OCCURS clause in their definition.