IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Is level numbers needs to be the same for corresponding move


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Bhuvanakp

New User


Joined: 29 Aug 2007
Posts: 19
Location: Chennai

PostPosted: Wed Sep 12, 2007 2:41 pm
Reply with quote

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)

Quote:
Back to top
View user's profile Send private message
murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1436
Location: Bangalore,India

PostPosted: Wed Sep 12, 2007 2:56 pm
Reply with quote

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
View user's profile Send private message
Bhuvanakp

New User


Joined: 29 Aug 2007
Posts: 19
Location: Chennai

PostPosted: Wed Sep 12, 2007 3:23 pm
Reply with quote

Hi Murali,


Thanks ...
Back to top
View user's profile Send private message
Sandy Zimmer

Active Member


Joined: 13 Jun 2007
Posts: 826
Location: Wilmington, DE

PostPosted: Fri Sep 14, 2007 9:49 pm
Reply with quote

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
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Sat Sep 15, 2007 2:38 am
Reply with quote

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
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Sat Sep 15, 2007 2:40 am
Reply with quote

Bhuvanakp,

you can easily write a rexx macro that will take two copybooks and generate the necessary MOVE statements.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts How to load to DB2 with column level ... DB2 6
No new posts Generate random number from range of ... COBOL Programming 3
No new posts COBOL - Move S9(11)v9(7) COMP-3 to -(... COBOL Programming 5
No new posts ISRSUPC search utility - using high l... TSO/ISPF 2
Search our Forums:

Back to Top