corr in COBOL

michael_ch
michael_ch used Ask the Experts™
on
What does corr in COBOL means?

move corr xyz in abc to zyx cba

Thanks and regards

Michael
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Most Valuable Expert 2013
Top Expert 2013
Commented:
Hi,
MOVE CORRESPONDING is used to move elementary fields of a group-level field to corresponding fields of the target group-level field.
The elementary fields must be of exactly the same name to get moved!
Attached is a well- known example.
If you issue MOVE CORRESPONDING GROUP-1 TO GROUP-2 then FIELD-A and FIELD-E will be moved but FIELD-C and FIELD-D have different group-level names (FIELD-B vs. FIELD-BB) so they don't correspond and will not be moved!
 wmp
 

01  GROUP-1.                       01  GROUP-2.
         05  FIELD-A        PIC 999.        05  FIELD-E      PIC 99. 
         05  FIELD-B.                       05  FIELD-A      PIC 9(4).
             10  FIELD-C    PIC X(12).      05  FIELD-BB.
             10  FIELD-D    PIC XXX.            10  FIELD-C  PIC XXX.
         05  FIELD-E        PIC 99.             10  FIELD-D  PIC X.
         05  FIELD-F        PIC X.          05  FIELD-G      PIC X(10).

Open in new window

Author

Commented:
Thanks a lot for your answer.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial