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

FETCH PROTECTED AREA error in Xpeditor


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

Active User


Joined: 14 Dec 2008
Posts: 107
Location: India

PostPosted: Mon Feb 10, 2014 12:46 pm
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

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Mon Feb 10, 2014 12:56 pm
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: 107
Location: India

PostPosted: Tue Feb 11, 2014 10:11 am
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

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Tue Feb 11, 2014 1:17 pm
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

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Tue Feb 11, 2014 2:43 pm
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: 2501
Location: Atlanta, Georgia, USA

PostPosted: Tue Feb 11, 2014 3:50 pm
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Error to read log with rexx CLIST & REXX 11
No new posts Error when install DB2 DB2 2
No new posts CLIST - Virtual storage allocation error CLIST & REXX 5
No new posts Fetch data from programs execute (dat... DB2 3
No new posts Error while running web tool kit REXX... CLIST & REXX 5
Search our Forums:

Back to Top