MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Limitations of MOVE CORRESPONDING

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming
View previous topic :: View next topic  
Author Message
k_rajen1
Beginner


Joined: 06 Mar 2007
Posts: 11
Topics: 2

PostPosted: Wed Nov 19, 2008 9:03 am    Post subject: Limitations of MOVE CORRESPONDING Reply with quote

Hello,

I have used MOVE CORRESPONDING for a group variable.

MOVE CORRESPONDING A TO B.


A has some occurs feilds so the movement of A to B is not happenning properly. Could any one suggest what logic should be used to use MOVE CORRESPONDING for occurs clause variable

Regards,
Raj.
Back to top
View user's profile Send private message
dbzTHEdinosauer
Supermod


Joined: 20 Oct 2006
Posts: 1411
Topics: 26
Location: germany

PostPosted: Wed Nov 19, 2008 9:49 am    Post subject: Reply with quote

well, MOVE CORRESPONDING is not considered good programming practice and should be avoided.

The documentation indicates that an occurs clause can be associated with the group items, but not with the subordinate items.

but, to help you solve your problem, show us your data definitions for the two groups.

and I will test a bit.
_________________
Dick Brenholtz
American living in Varel, Germany
Back to top
View user's profile Send private message
k_rajen1
Beginner


Joined: 06 Mar 2007
Posts: 11
Topics: 2

PostPosted: Thu Nov 20, 2008 2:05 am    Post subject: Reply with quote

Thanks Dick,

Below is field for old Variables which i want to move to new variable using MOVE CORRESPONDING

01 RECORD
03 KEY.
03 Field-1.
03 Field-2.
05 USER-TABLE.
07 USER-FEES-TABLE OCCURS 10 TIMES INDEXED BY A
09 Field-3
09 Field-4
03 Feild-5
Back to top
View user's profile Send private message
jsharon1248
Intermediate


Joined: 08 Aug 2007
Posts: 291
Topics: 2
Location: Chicago

PostPosted: Thu Nov 20, 2008 10:49 am    Post subject: Reply with quote

What exactly to you save by doing a MOVE CORRESPONDING? 5 or 6 lines of code? dbz is right. Don't do it. Code the individual MOVE statements, or MOVE the group level. The answer to your initial question about why this isn't working for you is in the COBOL Language Reference.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group