Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

move

Status
Not open for further replies.

rtamma

Programmer
May 16, 2002
5
US
can we move a group item into another group item without doing the individual moves.
Eg : I have a group item say A occurs X times and another group itme B occurs X times . The structure of the two is same . If i want to move the data in A to B how do i do that without individual moves ?
 
Short answer: YES.

Any MOVE involving a group item is moved without regard to the format of the elementary items subordinate to the group(s). So, given that the structures subordinate to the two groups are identical, your group MOVE is quite safe, and normal coding practice. Tom Morrison
 
hi,
u can do it by using MOVE CORRESPONDING.
for example :- MOVE CORRESPONDING GROUP1-REC TO GROUP2-REC.


Ash..
 
You need to have group names.

01 GRP-A.
05 A OCCURS 10 TIMES PIC S9(4) comp-3.
01 GRP-B.
05 B OCCURS 10 TIMES PIC S9(4) COMP-3.

MOVE GRP-A TO GRP-B.

If you try to move A to B, the compiler will insist on a subscript.

Stephen J Spiro
 
Ash,
MOVE CORRESPONDING does not work on occurs fields, but gives you a compile warning saying that it's outside of the rules and so has done nothing.

Marc
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top