Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Protection exception

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> PL/I & Assembler
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    Post subject: Protection exception
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

Active Member


Joined: 07 Feb 2009
Posts: 984
Location: Oostende, Belgium

PostPosted: Fri Sep 17, 2010 4:19 pm    Post subject:
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    Post subject:
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: 7913
Location: Bellevue, IA

PostPosted: Fri Sep 17, 2010 5:06 pm    Post subject:
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

Active Member


Joined: 07 Feb 2009
Posts: 984
Location: Oostende, Belgium

PostPosted: Fri Sep 17, 2010 5:08 pm    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Fri Sep 17, 2010 5:29 pm    Post subject: Reply to: Protection exception
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    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Tue Sep 21, 2010 12:14 pm    Post subject: Reply to: Protection exception
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    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Tue Sep 21, 2010 2:00 pm    Post subject: Reply to: Protection exception
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: 7913
Location: Bellevue, IA

PostPosted: Tue Sep 21, 2010 4:04 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> PL/I & Assembler All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Protection Exception while move 0 to ... Kevin Vaz CICS 10 Tue Oct 18, 2016 4:19 pm
No new posts Facing xml parser exception 798761 murugan_mf COBOL Programming 17 Sat Apr 30, 2016 1:27 pm
No new posts Exception Handling in Native Stored P... Mariraj DB2 1 Thu Feb 25, 2016 4:08 am
No new posts S0C7 Data Exception Error Niti Srivastava ABENDS & Debugging 4 Mon Feb 23, 2015 5:40 pm
No new posts Memory Exception rakhin CICS 2 Thu Feb 19, 2015 9:23 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us