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

SOC4 - Protection Exception Error


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
gopalkulkarni

New User


Joined: 13 Aug 2007
Posts: 12
Location: Pune, India

PostPosted: Mon Oct 12, 2009 12:28 pm
Reply with quote

Hi,

While running JCL with VB file as input & output, i am getting error message as protection exception error (SOC4). Input file is in proper format. Please provide me details that, what is protection exception error & how to overcome through this.

Thanks.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Mon Oct 12, 2009 4:42 pm
Reply with quote

S0C4, a protection exception means your program is attempting to read (or write) memory that does not belong to it. While it may be related to a file issue, in most cases it is related to other things such as tables or subprograms.

You resolve it the same way any other Abend is resolved -- use the dump to determine which line of code had the problem, then back track to figure out what caused that line of code to have the problem. Since you did not provide any details, we cannot provide any detailed assistance.
Back to top
View user's profile Send private message
gopalkulkarni

New User


Joined: 13 Aug 2007
Posts: 12
Location: Pune, India

PostPosted: Mon Oct 12, 2009 4:48 pm
Reply with quote

Thanks for the information.
This is related to a file issue.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Mon Oct 12, 2009 4:52 pm
Reply with quote

Quote:
This is related to a file issue.
Maybe, maybe not. Good luck in resolving it.
Back to top
View user's profile Send private message
dejunzhu

Active User


Joined: 08 May 2008
Posts: 390
Location: China

PostPosted: Mon Oct 12, 2009 8:40 pm
Reply with quote

I suggest maybe you should try to change compile options for PL/1 program, if the same error still exists after you tried out every conceivable means.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Mon Oct 12, 2009 8:44 pm
Reply with quote

dejunzhu, where exactly is a statement made that this is a PL/I program? If it is not a PL/I program, your advice is completely wrong -- and certainly misleading without knowing for sure if the program is PL/I.
Back to top
View user's profile Send private message
dejunzhu

Active User


Joined: 08 May 2008
Posts: 390
Location: China

PostPosted: Mon Oct 12, 2009 8:47 pm
Reply with quote

Robert Sample wrote:
dejunzhu, where exactly is a statement made that this is a PL/I program? If it is not a PL/I program, your advice is completely wrong -- and certainly misleading without knowing for sure if the program is PL/I.

My mistake...
I just provided a feasible method based on my experience, ONLY IF the PGM is written by PL/1 or Cobol language.
Back to top
View user's profile Send private message
dejunzhu

Active User


Joined: 08 May 2008
Posts: 390
Location: China

PostPosted: Mon Oct 12, 2009 8:51 pm
Reply with quote

and besides, if you google SOC4, you can easily find the following answers to it:


SOC4 abend may be due to the following reasons.

1.Missing SELECT statement ( During Compile time)

2.Bad Subscript/Index

3.Read/Write attempt to unopened file

4.Move data to/from unopened file

5.Missing parameters in called subprogram

SOC7 abend may be due to the following reasond

1.Numeric Operation on Non-numeric data

2.Coding past the maximum allowed subscript.

3.Un-initialize working storage.

Please let me know if there more reasons for the above mentioned abends.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Mon Oct 12, 2009 11:17 pm
Reply with quote

Hello,

Quote:
Please let me know if there more reasons for the above mentioned abends.
Yes, there are. . .

Quote:
and besides, if you google SOC4, you can easily find the following answers to it:
Suggest a better source of info would be the IBM documentation for z/OS System Codes available via the IBM Manuals link at the top of the page. One of the problems with Google is the reader must make sure that the material is correct and applicable. One of the problems with so much material online is that nowdays, much of what is posted (concerning Information Technology) is incomplete, incorrect, or both. . . icon_sad.gif

Please post solutions/suggestions directly related to the topic request and not things that "happened once upon a time" and might be related. . .

Quote:
While running JCL with VB file as input & output
Never going to happen. . . Somewhere in there a program is executed - the jcl does nothing but execute programs. Which program(s) are having this abend - general utilities from some vendor or something written/changed locally?
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Tue Oct 13, 2009 12:28 am
Reply with quote

Quote:
I suggest maybe you should try to change compile options for PL/1 program, if the same error still exists after you tried out every conceivable means.

changing compilation options, whatever the language, is a useless/illogic approach...
compilation options are standards issued by the organization
and programmers are not allowed to change them

the right approach is to start debugging in the proper way...

Quote:
While running JCL with VB file as input & output, i am getting error message as protection exception error (SOC4). Input file is in proper format. Please provide me details that, what is protection exception error & how to overcome through this.

a topic started in such a way is just going to be a loss of time for everybody
Back to top
View user's profile Send private message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2547
Location: Silicon Valley

PostPosted: Tue Oct 13, 2009 2:12 am
Reply with quote

Robert said:
Quote:
use the dump to determine which line of code had the problem, then back track to figure out


Agree. Figure out where it abends. Use your debugger to stop just before that instruction and examine the associated variables and base registers.


Quote:
A protection exception means your program is attempting to read (or write) memory that does not belong to it.

You can also have problems if you update storage that does belong to you... but in update in a way that you did not intend to. Actually, I think you can update almost any storage in your private area. If your pointers are bad, you could corrupt storage areas used by other programs (I am guilty of crashing my ISPF sessions).
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 -> JCL & VSAM

 


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 Check data with Exception Table DB2 0
No new posts Error while running web tool kit REXX... CLIST & REXX 5
Search our Forums:

Back to Top