View previous topic :: View next topic
|
Author |
Message |
babuprasad_g Currently Banned New User
Joined: 26 May 2005 Posts: 45 Location: gurgaon
|
|
|
|
Hi Folks,
01 WS-AA PIC X(10).
01 WS-REDEF-AA REDEFINES WS-AA.
05 WS-BB PIC 9(10).
is this possible.if we delare like this what will happend. |
|
Back to top |
|
|
harinadh
New User
Joined: 01 Sep 2004 Posts: 18
|
|
|
|
Hi,
You wont get any error. We can declare like that. |
|
Back to top |
|
|
Puneet
New User
Joined: 27 Jun 2005 Posts: 9 Location: Chennai
|
|
|
|
HI ,
It won't thow any error if we are moving only numeric fields.
but it can give abnormal termination when Alpha-numeric data is moved :
MOVE 'ABCDE' to WS-AA
As WS-AA and WS-BB are sharing the same memory will it cause abend at this step?
Thanks,
Puneet |
|
Back to top |
|
|
David P
Active User
Joined: 11 Apr 2005 Posts: 106 Location: Cincinnati Ohio
|
|
|
|
Hi Puneet,
The move statement you mentioned above :
MOVE 'ABCDE' TO WS-AA will never terminate the execution abnormally.
But the arithmetic operations like :
ADD 1 TO WS-AA
will certainly cause an abnormal termination.
regards,
David. |
|
Back to top |
|
|
David P
Active User
Joined: 11 Apr 2005 Posts: 106 Location: Cincinnati Ohio
|
|
|
|
Hi,
I am sorry for the above post what I wanted to say is
ADD 1 TO WS-BB
will cause an abend.
ADD 1 TO WS-AA will throw a compilation error.
regards,
David. |
|
Back to top |
|
|
|