View previous topic :: View next topic
|
Author |
Message |
counto
New User
Joined: 30 Jun 2005 Posts: 1
|
|
|
|
Hi,
I have the following array:
01 WS-LINE-TABLE.
05 WS-LINE-SWITCH OCCURS 7 TIMES.
07 WS-LINE-SW PIC X.
With SSrange ON is it possible for me to access all the occurences of WS-LINE-SW ? I mean, will the following line of code work?
MOVE WS-LINE-SW (var-1) TO var-2 ?
Or would i need to access it by:
MOVE WS-LINE-SWITCH (var-1) TO var-2.
Thanks. |
|
Back to top |
|
|
priya
Moderator
Joined: 24 Jul 2003 Posts: 568 Location: Bangalore
|
|
|
|
Quote: |
all the occurences of WS-LINE-SW |
WS-LINE-SW is not an array. Then how you got occurances??
MOVE WS-LINE-SW (var-1) TO var-2
Error.
MOVE WS-LINE-SWITCH (var-1) TO var-2
It's ok. If you code SSRANGE, then you will get an error message at runtime only if var-1 > 7. Otherwise (SSRANGE Off) you will get Junk value in Var-2. |
|
Back to top |
|
|
mmwife
Super Moderator
Joined: 30 May 2003 Posts: 1592
|
|
|
|
WS-LINE-SW is part of the array because it is subordinate to
WS-LINE-SWITCH. |
|
Back to top |
|
|
Prasanthhere
Active User
Joined: 03 Aug 2005 Posts: 306
|
|
|
|
SS range is used only just 2 check the out of boundary conditions so what u have specified there will will work as long as its with in the array limit |
|
Back to top |
|
|
atik
New User
Joined: 29 Jul 2005 Posts: 20
|
|
|
|
MOVE WS-LINE-SW (var-1) TO var-2
can be used. |
|
Back to top |
|
|
Prasanthhere
Active User
Joined: 03 Aug 2005 Posts: 306
|
|
|
|
It will work definitely we cna move value like that as u specifed |
|
Back to top |
|
|
|