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

Protection exception


IBM Mainframe Forums -> PL/I & Assembler
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
shreejita

New User


Joined: 16 Aug 2009
Posts: 60
Location: chennai

PostPosted: Fri Sep 17, 2010 2:50 pm
Reply with quote

Hi,

I have coded a simple PLI program but unable to find the solution for this

DCL A FIXED DEC(5) INIT(0);
DCL B FIXED DEC(5) INIT(0);
DCL C FIXED DEC(5) INIT(175);
PUT DATA (A,B,C);

I get ONCODE=8094 Protection exception which says address translation error or storage protected .

Please guide me.
Back to top
View user's profile Send private message
prino

Senior Member


Joined: 07 Feb 2009
Posts: 1306
Location: Vilnius, Lithuania

PostPosted: Fri Sep 17, 2010 4:19 pm
Reply with quote

This code cannot lead to a S0C4,the actual error is in statement 42.
Back to top
View user's profile Send private message
shreejita

New User


Joined: 16 Aug 2009
Posts: 60
Location: chennai

PostPosted: Fri Sep 17, 2010 4:36 pm
Reply with quote

HI,

I didn't understand your answer.

My program just looks like this

MYPGM: PROC OPTION(MAIN);
DCL A FIXED DEC(5) INIT(0);
DCL B FIXED DEC(5) INIT(0);
DCL C FIXED DEC(5) INIT(175);
PUT DATA (A,B,C);
END MYPGM;

Only 6 lines all together.
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: Fri Sep 17, 2010 5:06 pm
Reply with quote

Here's a quote from chapter 13.5 of the Language Reference manual. See if you can figure out which of these restrictions your data does not meet:
Quote:
A based variable in the data-list has the following restrictions:

* The variable must not be based on an OFFSET variable.

* The pointer on which the variable is based must not be in DEFINED storage.

* If the pointer on which the variable is based is itself BASED, then the chain of basing pointers must end with a pointer that is neither BASED nor DEFINED.

A defined variable in the data-list must:

* Be a picture or character variable

* Not be defined on a controlled variable

* Not be defined on an element or cross section of an array

* Not be defined with a nonconstant POSITION attribute

Typed structures can not be used in data-directed input/output statements.
Back to top
View user's profile Send private message
prino

Senior Member


Joined: 07 Feb 2009
Posts: 1306
Location: Vilnius, Lithuania

PostPosted: Fri Sep 17, 2010 5:08 pm
Reply with quote

Robert Sample wrote:
Here's a quote from chapter 13.5 of the Language Reference manual. See if you can figure out which of these restrictions your data does not meet:
Quote:
A based variable in the data-list has the following restrictions:

* The variable must not be based on an OFFSET variable.

* The pointer on which the variable is based must not be in DEFINED storage.

* If the pointer on which the variable is based is itself BASED, then the chain of basing pointers must end with a pointer that is neither BASED nor DEFINED.

A defined variable in the data-list must:

* Be a picture or character variable

* Not be defined on a controlled variable

* Not be defined on an element or cross section of an array

* Not be defined with a nonconstant POSITION attribute

Typed structures can not be used in data-directed input/output statements.


All of the above would lead to errors at compile time, not a S0C4 at run-time.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Fri Sep 17, 2010 5:29 pm
Reply with quote

it is difficult to understand what is going on over there

the program as written will not even compile !

once corrected the obvious mistake it ran correctly even under MVS 3.8 PLI F (5.5 )

Code:
A=       0              B=       0              C=     175;
Back to top
View user's profile Send private message
shreejita

New User


Joined: 16 Aug 2009
Posts: 60
Location: chennai

PostPosted: Tue Sep 21, 2010 12:05 pm
Reply with quote

Hi,

For me Compile works with maxcc=0 but runtime SOC4.

Can u let me know how to solve this????

Thanks
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Tue Sep 21, 2010 12:14 pm
Reply with quote

NO! until You post more info
jcl used, output of the run
Back to top
View user's profile Send private message
shreejita

New User


Joined: 16 Aug 2009
Posts: 60
Location: chennai

PostPosted: Tue Sep 21, 2010 1:49 pm
Reply with quote

Thanks for the reply

I am using pli version PLI.V2R3M0 and PGM=IEL0AA,PARM='OBJECT,NODECK,SIZE,MAX),XREF,MACRO' and getting MAXCC=0 but when run the program i am getting SOC4 AS FOLLOWING MESSAGE

IBM0534S ONCODE=8094 Protection exception
From compile unit EXAM96 at entry point EXAM96 at compile unit offset +00000108 at entry offset +00000100 at address 09900968.

Thanks
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Tue Sep 21, 2010 2:00 pm
Reply with quote

when asking for help You should post what is being asked, not what You feel like
otherwise is just a useless back and forth


Your last post adds nothing to the starting info

post full input job stream, full sysout
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: Tue Sep 21, 2010 4:04 pm
Reply with quote

Quote:
For me Compile works with maxcc=0 but runtime SOC4.
So what? A compile code of zero merely means that the syntax is correct. It does not mean that the program will produce correct results -- or, indeed, any results at all -- since the program may do things that cause abends even though the syntax is fine.
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 -> PL/I & Assembler

 


Similar Topics
Topic Forum Replies
No new posts Check data with Exception Table DB2 0
No new posts Abend S0C4 11 (Page Translation Excep... PL/I & Assembler 16
No new posts Exception Filter CA Products 0
No new posts DSNTEP2 - setting exception DB2 2
This topic is locked: you cannot edit posts or make replies. S0C4-X'11' issue - page translation e... JCL & VSAM 10
Search our Forums:

Back to Top