Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

move vs move corresponding

Former Member
0 Likes
1,392

which is preferrable between move and move-corresponding based on performance issues?

4 REPLIES 4
Read only

Former Member
0 Likes
837

Move statement is best than move-corresponding statement .

Move-corresponding statement takes little bit performance but it is not countable.

Thanks

Seshu

Read only

former_member195698
Active Contributor
0 Likes
837

If you have a scenario in which you can use both then 'move' is better than 'move-corresponding'.

move-corresponding will be used only where you can't use a move statement as the fields might not be in the required sequence.

Read only

Former Member
0 Likes
837

From a performance standpoint, MOVE is better than MOVE-CORRESPONDING, but the improvement is so slight that I generally use MOVE-CORRESPONDING. You also have to take into account programming efficiency. Programming a couple of hundred MOVE statements may take more time than is saved in the life of the program using the MOVE-CORRESPONDING.

Rob

Read only

Former Member
837

the general performance recommendation is the following:

Never use move-corresponding with buffered tables, the overhead can be similar as the buffered access itself.

For database selects, the select itself is more expensive than the move corresponding. The decision come from the decision whether you want to use a fieldlist or a SELECT *. Fieldlists are recommended for very width tables, if the fieldlist reduces the width by a factor 2. Fieldlist must be used if your INTO structure is different from the table structure. In these 2 cases, you should use MOVE-CORRESPONDING.

Siegfried