IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

ABEND: A reference modification start position value of 0


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
dipanshu

New User


Joined: 16 Jan 2006
Posts: 53
Location: pune

PostPosted: Sat Jan 28, 2006 2:43 pm
Reply with quote

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
View user's profile Send private message
gowtham_1982
Warnings : 1

Active User


Joined: 02 Dec 2005
Posts: 109

PostPosted: Mon Jan 30, 2006 9:19 am
Reply with quote

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
View user's profile Send private message
dipanshu

New User


Joined: 16 Jan 2006
Posts: 53
Location: pune

PostPosted: Mon Jan 30, 2006 9:41 am
Reply with quote

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
View user's profile Send private message
sbalajibe

New User


Joined: 15 Aug 2005
Posts: 62

PostPosted: Mon Jan 30, 2006 10:58 am
Reply with quote

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
View user's profile Send private message
dipanshu

New User


Joined: 16 Jan 2006
Posts: 53
Location: pune

PostPosted: Mon Jan 30, 2006 12:46 pm
Reply with quote

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
View user's profile Send private message
prabahar

New User


Joined: 25 Nov 2005
Posts: 6

PostPosted: Mon Jan 30, 2006 12:49 pm
Reply with quote

Please check the index of the array.
Back to top
View user's profile Send private message
dipanshu

New User


Joined: 16 Jan 2006
Posts: 53
Location: pune

PostPosted: Mon Jan 30, 2006 12:53 pm
Reply with quote

I initialize subscript as
perform para1 varying I from 1 by 1 until I > 3.
Back to top
View user's profile Send private message
sbalajibe

New User


Joined: 15 Aug 2005
Posts: 62

PostPosted: Mon Jan 30, 2006 4:08 pm
Reply with quote

hi dipanshu


change the declaration on x-F as
01 x-F pic x(7) and try the same


thanks
Balaji
Back to top
View user's profile Send private message
gowtham_1982
Warnings : 1

Active User


Joined: 02 Dec 2005
Posts: 109

PostPosted: Tue Jan 31, 2006 9:33 am
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
No new posts ISAM and abend S03B JCL & VSAM 10
No new posts parsing variable length/position data... DFSORT/ICETOOL 5
No new posts Abend S0C4 11 (Page Translation Excep... PL/I & Assembler 16
No new posts WER999A - UNSUCCESSFUL SORT 8ED U Ab... SYNCSORT 5
Search our Forums:

Back to Top