View previous topic :: View next topic
|
Author |
Message |
Bhuvanakp
New User
Joined: 29 Aug 2007 Posts: 19 Location: Chennai
|
|
|
|
Hi,
Kindly advise: is level numbers needs to be the same for corresponding move
Example:
01 A-GROUP. 01 B-GROUP.
02 FIELD1. 02 FIELD1.
03 A PIC X. 03 A PIC X.
03 B PIC 9. 03 C PIC XX.
03 C PIC XX. 03 E PIC XXX.
03 D PIC 99.
03 E PIC XXX.
MOVE CORRESPONDING A-GROUP TO B-GROUP.
Here pls advise A of A-GROUP (Level 03) needs to be is the same as B of B-Group.(Level 03)
|
|
Back to top |
|
|
murmohk1
Senior Member
Joined: 29 Jun 2006 Posts: 1436 Location: Bangalore,India
|
|
|
|
Bhuvana,
From QW -
Quote: |
When CORRESPONDING is specified (in Format 2), both identifier1 and
identifier2 must be group items. In this case, selected items (i.e.,
those with the same name) in identifier1 are moved to identifier2
(i.e., according to the rules for the CORRESPONDING phrase). |
|
|
Back to top |
|
|
Bhuvanakp
New User
Joined: 29 Aug 2007 Posts: 19 Location: Chennai
|
|
|
|
Hi Murali,
Thanks ... |
|
Back to top |
|
|
Sandy Zimmer
Active Member
Joined: 13 Jun 2007 Posts: 826 Location: Wilmington, DE
|
|
|
|
Move corresponding is a very dangerous antique way of doing things. Many installations do not allow it. Instead, I would suggest that you do your moves at the elementary field level.
move a of a-group to a of b-group
move b of a group to b of b-group
move c of a group to c of b-group |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
Sandy,
though you and I disagree about indexes and subscripts, I totally agree with you about MOVE CORRESPONDING. Only takes a copybook change and someone has a headache. |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
Bhuvanakp,
you can easily write a rexx macro that will take two copybooks and generate the necessary MOVE statements. |
|
Back to top |
|
|
|