Joined: 23 Nov 2006 Posts: 19270 Location: Inside the Matrix
Hello rohan kumar panda and welcome to the forums,
It is usually not good to use the same elementary field names for fields within different groups. Many places will not permit this.
It makes coding more tedious and can cause problems for years. If the program is many thousand lines and there are one or 2 "moves" that refer to the wrong qualified field name, it may go undetected for a long time.
I'd suggest working to eliminate this rather than find ways to exploit it. It is another of the things you can do that should not be done.
Joined: 13 Jun 2007 Posts: 826 Location: Wilmington, DE
If you cannot change the copybook, please do not use 'move corresponding'. It is dangerous if someone changes the copybook and does not change your code. If you do not change the elementary item names, I would suggest that you use:
move x of GP1 to x of GP2
move y of GP1 to y of GP2