View previous topic :: View next topic
|
Author |
Message |
dipanshu
New User
Joined: 16 Jan 2006 Posts: 53 Location: pune
|
|
|
|
01 X-ARRAY.
05 X-G OCCURS 3 TIMES PIC x(7).
77 x-F PIC X(7) .
MOVE X-G(I)(1:2) to X-F(1:2)
GIVING USER ABEND - A reference modification start position value of 0 on line 000067 referenced an area outside the region of
data item X-G.
CAN ANYONE SUGGEST ME THE PROBABLE REASON.
Regards
Dipanshu |
|
Back to top |
|
|
gowtham_1982 Warnings : 1 Active User
Joined: 02 Dec 2005 Posts: 109
|
|
|
|
dipanshu wrote: |
01 X-ARRAY.
05 X-G OCCURS 3 TIMES PIC x(7).
77 x-F PIC X(7) .
MOVE X-G(I)(1:2) to X-F(1:2)
GIVING USER ABEND - A reference modification start position value of 0 on line 000067 referenced an area outside the region of
data item X-G.
CAN ANYONE SUGGEST ME THE PROBABLE REASON.
Regards
Dipanshu |
Hi Dipanshu,
what is the value of I? how have you defined it? Just check the value of it before the abend statement.
corrections welcomed,
gowtham |
|
Back to top |
|
|
dipanshu
New User
Joined: 16 Jan 2006 Posts: 53 Location: pune
|
|
|
|
I declared variable
77 I pic x(1)
using in peform stmt as
perform para1 varying I from 1 by 1 until I > 3.
Para1
MOVE X-G(I)(1:2) to X-F(1:2) ----> showing abend as discussed above
MOVE X-G(I)(1:2) to X-F(I)(1:2) -------> ran with maxcc 0 .
why? |
|
Back to top |
|
|
sbalajibe
New User
Joined: 15 Aug 2005 Posts: 62
|
|
|
|
hi dipanshu,
r u sure the declaration of X-F is 77 then
MOVE X-G(I)(1:2) to X-F(I)(1:2) should give error rather than error on
MOVE X-G(I)(1:2) to X-F(1:2)
please checkit
thanks
balaji |
|
Back to top |
|
|
dipanshu
New User
Joined: 16 Jan 2006 Posts: 53 Location: pune
|
|
|
|
Firstly I decld.
01 X-ARRAY.
05 X-G OCCURS 3 TIMES PIC x(7).
77 x-F PIC X(7) .
MOVE X-G(I)(1:2) to X-F(1:2) ----> showing abend as discussed above
Secondly, I decld
05 X-F OCCURS 3 TIMES PIC x(7).
MOVE X-G(I)(1:2) to X-F(I)(1:2) -------> ran with maxcc 0
Might be we can't move array element with refrence mod. to simple variable.
Is it correct? |
|
Back to top |
|
|
prabahar
New User
Joined: 25 Nov 2005 Posts: 6
|
|
|
|
Please check the index of the array. |
|
Back to top |
|
|
dipanshu
New User
Joined: 16 Jan 2006 Posts: 53 Location: pune
|
|
|
|
I initialize subscript as
perform para1 varying I from 1 by 1 until I > 3. |
|
Back to top |
|
|
sbalajibe
New User
Joined: 15 Aug 2005 Posts: 62
|
|
|
|
hi dipanshu
change the declaration on x-F as
01 x-F pic x(7) and try the same
thanks
Balaji |
|
Back to top |
|
|
gowtham_1982 Warnings : 1 Active User
Joined: 02 Dec 2005 Posts: 109
|
|
|
|
dipanshu wrote: |
I declared variable
77 I pic x(1)
using in peform stmt as
perform para1 varying I from 1 by 1 until I > 3.
Para1
MOVE X-G(I)(1:2) to X-F(1:2) ----> showing abend as discussed above
MOVE X-G(I)(1:2) to X-F(I)(1:2) -------> ran with maxcc 0 .
why? |
hi dipanshu,
i think you suceeded as it was a move to an array element. in that case you would have defined X-F in 01 level.
suggestions and welcomed...
gowtham |
|
Back to top |
|
|
|