Cobol MOVES



Support for OS/VS COBOL, VS COBOL II, COBOL for OS/390 & VM and Enterprise COBOL for z/OS

Cobol MOVES

Postby reebahs » Tue Dec 21, 2010 10:59 pm

What is the difference between MOVE and MOVE CORRESPONDING ?
also kindly answer the following.

Thank you
01 GRP1
02 GRP1-ELEM-ITEM1 PIC X(5) VALUE 'ABCDE'.
02 GRP1-ELEM-ITEM2 PIC 9(7) VALUE 1234567.

01 GRP2
02 GRP2-ELEM-ITEM1 PIC X(5).
02 GRP2-ELEM-ITEM2 PIC X(7).
02 GRP2-ELEM-ITEM3 PIC 9(7).
02 GRP2-ELEM-ITEM4 PIC A(7).

PROCEDURE DIVISION.
MOVE GRP1 TO GRP2.
DISPLAY GRP2.
MOVE CORRESPONDING GRP1 TO GRP2.
DISPLAY GRP2.
reebahs
 
Posts: 28
Joined: Thu Dec 09, 2010 1:03 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Cobol MOVES

 

Re: Cobol MOVES

Postby NicC » Wed Dec 22, 2010 2:04 am

Please read the COBOL Language Reference manual - answering questions like this is what it is for. If you HAVE read it and there is something you do not understand then post regarding the bit that you do not understand.
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 2690
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisys (almost)
Has thanked: 4 times
Been thanked: 105 times


Return to IBM Cobol

 


  • Related topics
    Replies
    Views
    Last post