Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Is level numbers needs to be the same for corresponding move

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
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    Post subject: Is level numbers needs to be the same for corresponding move
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: 1439
Location: Bangalore,India

PostPosted: Wed Sep 12, 2007 2:56 pm    Post subject:
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    Post subject:
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    Post subject:
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    Post subject:
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Incorrect output when trying to add n... monica1 PL/I & Assembler 10 Fri Jan 13, 2017 5:02 pm
This topic is locked: you cannot edit posts or make replies. How to move a long alphanumeric data ... lind sh COBOL Programming 8 Mon Dec 05, 2016 7:51 pm
No new posts Row-Numbers of distinct rows? Auryn DB2 1 Thu Oct 20, 2016 4:38 pm
No new posts Protection Exception while move 0 to ... Kevin Vaz CICS 10 Tue Oct 18, 2016 4:19 pm
This topic is locked: you cannot edit posts or make replies. Alphanumeric to Numeric move on UNIX mistah kurtz COBOL Programming 16 Wed Jul 27, 2016 8:47 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us