View previous topic :: View next topic
|
Author |
Message |
new2cobol
New User
Joined: 04 Jan 2006 Posts: 77 Location: Bangalore
|
|
|
|
That is the reason given by my JOB before it abends!!!
I DEBUG it in IBM debugger, it runs through fine!!! When I run the job it bombs out with this error!!!
SYSOUT says:
CEE3204S The system detected a protection exception (System Completion Code=0C4).
Now this occurs in the line where I CLOSE my file after all operations.
What is this?
Help!!! |
|
Back to top |
|
|
DavidatK
Active Member
Joined: 22 Nov 2005 Posts: 700 Location: Troy, Michigan USA
|
|
|
|
new2cobol
Very difficult to say what the exact problem is without seeing and testing the entire code, However, I can tell you what I have experienced debugging a couple of programs that run fine in debug mode but abend when run native. It usually is related to a subscript outside it?s bounds, and due to the memory layout being different in debug and native run mode, the subscript is not corrupting critical or used memory in debug mode, but is corrupting used memory in native mode.
Whatever the reason, I?ve found its almost always due to the difference in memory mapping.
Dave |
|
Back to top |
|
|
new2cobol
New User
Joined: 04 Jan 2006 Posts: 77 Location: Bangalore
|
|
|
|
Dave,
Can you suggest a workaround? A compile time / Run time option to be given? Any SYSUDUMP/SYSABEND/SYS something to be added in JCL? Anything?
Thanks,
N2C |
|
Back to top |
|
|
new2cobol
New User
Joined: 04 Jan 2006 Posts: 77 Location: Bangalore
|
|
|
|
this is the explanation I looked up... Can't make head and tail of it...
"Protection exception. The key of the storage area
that the running program tries to access is
different from that of the running program. The key
of the running program can be obtained from the PSW
key field. The key of the storage can be obtained
using the IPCS LIST subcommand. The programmer
should determine whether the program is running
with the correct key or whether the storage address
is set up correctly." |
|
Back to top |
|
|
new2cobol
New User
Joined: 04 Jan 2006 Posts: 77 Location: Bangalore
|
|
|
|
And yes Dave, its the Dynamic allocation thingy, the program you suggested here. |
|
Back to top |
|
|
new2cobol
New User
Joined: 04 Jan 2006 Posts: 77 Location: Bangalore
|
|
|
|
After all panic, dozens of glasses of water and tons of potato chips, I was able to search out a solution from the forum itself. So for the people who are inquisitive, I'm posting this.
I am dynamically allocating a file in a cobol program, using this . Now the issue is that the files which I do an open and close, do not close properly. If I run the JCL a second time (with scratch steps to delete the files created in the first run) it hangs up saying that waiting for the files. I manually delete the files and proceed, it gives me an abend. The real reason in the abend is a S0C4, whose reason I found here . Now, how to get around that problem? The answer was infront of me!!! Here!!!
And look at me, I feel like an idiot... But a very happy one!!! |
|
Back to top |
|
|
|