Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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: 6968
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: 6968
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 Move from Comp3 variable to Edited Va... sreekusr COBOL Programming 8 Thu Aug 10, 2017 4:20 pm
No new posts DB2 9.1.0 not move values to Host-Var... Miguel Fernandez DB2 8 Wed Jan 25, 2017 8:24 pm
No new posts DB2 9.1.0 not move values to Host-Var... Miguel Fernandez DB2 0 Wed Jan 25, 2017 8:23 pm
No new posts DB2 9.1.0 not move values to Host-Var... Miguel Fernandez DB2 0 Wed Jan 25, 2017 8:21 pm
No new posts Incorrect output when trying to add n... monica1 PL/I & Assembler 10 Fri Jan 13, 2017 5:02 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us