View previous topic :: View next topic
|
Author |
Message |
ilakkia Warnings : 1 New User
Joined: 17 May 2008 Posts: 28 Location: chennai
|
|
|
|
When WS-VAR1 and WS-VAR2 are defined as below,
01 WS-VAR1 PIC S9(2)V9(3) COMP-3.
01 WS-VAR2 PIC S9(2)V9(3) COMP-3.
Is the below MOVE statment valid?
MOVE WS-VAR1 TO WS-VAR2. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
Yes -- moving a numeric variable to another numeric variable is valid. There is a link to manuals at the top of the page. Click on it, find the COBOL Language Reference manual, find section 6.2.24 on the MOVE statement and read every page of this section very closely. Not only will you gain the valuable benefit of being able to answer such questions yourself, but you also will learn more about COBOL than you know. |
|
Back to top |
|
|
ilakkia Warnings : 1 New User
Joined: 17 May 2008 Posts: 28 Location: chennai
|
|
|
|
Thanks, I will definitely read the manual.
Can you help me answer one question please.
In the same scenario what will happen if WS-VAR2 is defines as below
01 WS-VAR2 PIC S9(2)V9(9) COMP-3.
Is the move valid? |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
As Robert posted:
Quote: |
Yes -- moving a numeric variable to another numeric variable is valid. |
As i mentioned in your other post - try this and post the result and any doubt you may have about the result.
Also, as Robert mentioned, there is a link at the top of the page to "IBM Manuals". The first set is fro COBOL. |
|
Back to top |
|
|
|