Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 
FETCH PROTECTED AREA error in Xpeditor

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
hiravibk
Warnings : 1

Active User


Joined: 14 Dec 2008
Posts: 103
Location: India

PostPosted: Mon Feb 10, 2014 12:46 pm    Post subject: FETCH PROTECTED AREA error in Xpeditor
Reply with quote

HI All,

While trying to debug a subprogram,I am getting "FETCH PROTECTED AREA" message in the very first statement.

I have called a sub program dynamically by passing 2 variables which is of length 11 and 19 respectively. In the linkage section of the sub program, I have defined 2 variables of similar lengths 11 and 19 respectively and I have used procedure division using variable 1 and variable2. This resulted in the above error.

I have tried with declaring a s9(4) comp variable as the first variable in the linkage section of the sub program. Even in this case also I ended up with same error. Both the calling and called programs and batch. Can some one help me out in resolving this error?

Thanks in advance
Back to top
View user's profile Send private message

Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7315

PostPosted: Mon Feb 10, 2014 12:56 pm    Post subject: Reply to: FETCH PROTECTED AREA error in Xpeditor
Reply with quote

Which debugger?

You need to show your code. Data definitions, CALL and PROCEDURE DIVISION.
Back to top
View user's profile Send private message
hiravibk
Warnings : 1

Active User


Joined: 14 Dec 2008
Posts: 103
Location: India

PostPosted: Tue Feb 11, 2014 10:11 am    Post subject: Reply to: FETCH PROTECTED AREA error in Xpeditor
Reply with quote

DATA DEFINITION IN THE MAIN PROG:
01 P-IA.
05 NAME PIC X(11).
01 P-OA.
05 NAME PIC X(11).
05 DOB PIC X(8).


Call statement:

CALL WS-PROGRAM1 USING P-IA
P-OA
END-CALL



linkage section in the called program:
01 W-IA.
05 NAME PIC X(11).
01 W-OA.
05 NAME PIC X(11).
05 DOB PIC X(8).

PROCEDURE DIV in the called program:

PROCEDURE DIVISION USING W-IA, W-OA
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7315

PostPosted: Tue Feb 11, 2014 1:17 pm    Post subject: Reply to: FETCH PROTECTED AREA error in Xpeditor
Reply with quote

Well, that looks OK.

You are trying to access storage which does not belong to you, and worse than the usual S0C4 you are trying to get it from an area which is protected from you "fetching" it.

If the program was running before, review the latest changes. If it is a new program, more difficult, but you have to do things like check all the parameters to any transfers of control and ensure they are in the correct order, if not using SSRANGE check all subscripting - something has overwritten something and is giving you bad addresses.
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7315

PostPosted: Tue Feb 11, 2014 2:43 pm    Post subject: Reply to: FETCH PROTECTED AREA error in Xpeditor
Reply with quote

I've never got a message like that, but never used Xpeditor. Perhaps it is just a S0C4? Same process, anyway.
Back to top
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2502
Location: Atlanta, Georgia, USA

PostPosted: Tue Feb 11, 2014 3:50 pm    Post subject: Reply to: FETCH PROTECTED AREA error in Xpeditor
Reply with quote

Are your DATA DIVISION fields part of an FD whose file hasn't been opened yet or are they defined to WORKING-STORAGE?
Back to top
View user's profile Send private message
Terry Heinze

JCL Moderator


Joined: 14 Jul 2008
Posts: 1249
Location: Richfield, MN, USA

PostPosted: Tue Feb 11, 2014 7:59 pm    Post subject:
Reply with quote

Double check to make sure you are executing the load module you THINK you are executing. Xpediter can be a bit tricky.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Need DB2 query to fetch previous row ! Chandan1993 DB2 10 Sat Jun 03, 2017 10:43 am
No new posts DB2 Program abending without giving a... rahulgarg14 DB2 7 Mon May 29, 2017 8:10 pm
No new posts Getting error while opening a variabl... apandey1 COBOL Programming 5 Fri May 05, 2017 12:22 pm
No new posts IDC2902I Error tzeche ABENDS & Debugging 2 Tue Mar 28, 2017 11:39 am
No new posts Need help with below DB2 error ashek15 DB2 3 Sat Mar 18, 2017 5:56 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us