Joined: 06 Jun 2008 Posts: 8280 Location: Dubuque, Iowa, USA
If you run the compile with LIST (not OFFSET) you will see the MOVE statement is converted into a pseudo-assembler MVC instruction. This instruction moves 11 bytes from one field to another field -- as long as they are both USAGE DISPLAY. Note that the sending field does not even have to have numeric data; you can move anything from a variable to a PIC 9(11) USAGE DISPLAY field.
Attempting to do any arithmetic with the field, however, will cause problems unless all 11 characters are actually numeric digits. And you will also run into issues when fields are converted (USAGE COMP, COMP-3, etc) as these types of moves require numeric data or generally a S0C7 abend occurs.
Thanks for the reply
One more query I had ..
MOVE CC-00000000000 TO D17625-MEMBER-ID
Considering what I have as pic clause and what I'm moving ..
Although 05 CC-00000000000 PIC X(11) VALUE
is character by PIC clause but has zeroes in it..
Would I stil get Soc 7 if I manipulate D17625-MEMBER-ID ??