View previous topic :: View next topic
|
Author |
Message |
hiravibk Warnings : 1 Active User
Joined: 14 Dec 2008 Posts: 107 Location: India
|
|
|
|
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 |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
Which debugger?
You need to show your code. Data definitions, CALL and PROCEDURE DIVISION. |
|
Back to top |
|
|
hiravibk Warnings : 1 Active User
Joined: 14 Dec 2008 Posts: 107 Location: India
|
|
|
|
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 |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
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 |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
I've never got a message like that, but never used Xpeditor. Perhaps it is just a S0C4? Same process, anyway. |
|
Back to top |
|
|
Bill O'Boyle
CICS Moderator
Joined: 14 Jan 2008 Posts: 2501 Location: Atlanta, Georgia, USA
|
|
|
|
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 |
|
|
Terry Heinze
JCL Moderator
Joined: 14 Jul 2008 Posts: 1249 Location: Richfield, MN, USA
|
|
|
|
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 |
|
|
|