Guide on COBOL MOVE.

Post a reply


This question is a means of preventing automated form submissions by spambots.
Smilies
:D :) ;) :( :o :shock: :? 8-) :rofl: :x :cry: :P :oops: :!: :twisted: :roll: :evil: :?: :idea: :arrow: :| :good: :mrgreen: :sorry: :unknown: :yes: :lol:

BBCode is ON
[img] is ON
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: Guide on COBOL MOVE.

Re: Guide on COBOL MOVE.

by CobolQuery » Wed Mar 08, 2023 3:41 pm

Thanks.

Could you guide what are the side effects of moving a 30-byte variable to an 8-byte variable.

Re: Guide on COBOL MOVE.

by Robert Sample » Fri Feb 17, 2023 7:55 pm

Yes, that is how COBOL MOVE statements work. Please note that it is NOT a good idea to move a 30-byte variable to an 8-byte variable since you can have unexpected side effects.

Guide on COBOL MOVE.

by CobolQuery » Fri Feb 17, 2023 7:29 pm

Code: Select all

01 Temp1
     02 temp2 pic x(05)
     02 temp3.
           03 filler pic x(1)
           03 temp4 pic x(2)

01  Empno pic x(30)
Move empno to temp1
Suppose if i move 30 bytes data to temp1, temp2 has empno(1:5) , temp3 has empno (6:3) and temp4 has empno(7:2) . Is it correct?

Top