View previous topic :: View next topic
|
Author |
Message |
Shriram Jogdand
New User
Joined: 14 Oct 2008 Posts: 65 Location: Pune
|
|
|
|
Hi,
I have variables declared as below
01 WS-VAR.
05 WS-A PIC x(10).
05 WS-B PIC x(7) value 'SHRIRAM'.
My questions are
1. What will happen if i will initialize WS-VAR?
2. If it will move spaces in both the variable WS-A and WS-B, then what should we do to retain the values of WS-B after INITIALIZATION? |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
The idea of the interview questions forum is that you give your answers and the forum members will tell you if you are correct or not, and then help you understand the correct answer if needed. |
|
Back to top |
|
|
Shriram Jogdand
New User
Joined: 14 Oct 2008 Posts: 65 Location: Pune
|
|
|
|
My Answers were
1. If we will Initaialize then both the variable will have spaces.
2. I was not able to give answer of second one. |
|
Back to top |
|
|
Srihari Gonugunta
Active User
Joined: 14 Sep 2007 Posts: 295 Location: Singapore
|
|
|
|
I suppose changing WS-B to FILLER would do. |
|
Back to top |
|
|
Dsingh29
Active User
Joined: 16 Dec 2008 Posts: 132 Location: IBM
|
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
If only WS-A was initialized, WS-B would remain unchanged.
And the WS-B name would still be usable. . .
A rather poor question, imho. |
|
Back to top |
|
|
|