Page 1 of 2

Protection exception (S0C4)

PostPosted: Tue Sep 22, 2009 7:50 pm
by shik.trip
In our production system,we encountered below error for a job :

CEE3204S The system detected a protection exception (System Completion Code=0C4).

We ran this JCL multiple times to see what exactly went wrong as the code hasn't been changed from past many years.
Although the number of records, that the program processed successfully, were written in output file and rest were rejected.So we tried running the input file in parts as Part 1 and part 2 where we took half of the records in both.
This time the job ran successfully without any abends.

Could anybody please let me know,what exactly would be the possible cause of such abend.

Thanks a lot.

Re: Protection exception (System Completion Code=0C4).

PostPosted: Tue Sep 22, 2009 7:54 pm
by enrico-sorichetti
maybe the program has an internal table...
whose size depends on the number of records being processed

Re: Protection exception (System Completion Code=0C4).

PostPosted: Tue Sep 22, 2009 8:16 pm
by shik.trip
Thanks for your suggestion,but we noticed that the program doesn't insert/update/delete any record in tables,it just reads data from the table,uses the input file and produces the output for it.

Re: Protection exception (System Completion Code=0C4).

PostPosted: Tue Sep 22, 2009 8:49 pm
by Anuj Dhawan
Enrico meant "COBOL arrays (table)". S0C4 is Protection Exception, by definition.

There can be many reasons behind S0C4, such as --
  • An uncontrolled loop moved data on top of instructions.
  • Referencing a field in a record of a closed file .
  • Referencing an item in Linkage-Section when there was no PARM= in the JCL.
  • Calling/called programs have different length for items passed in Linkage Section.
  • With COBOL Sort, doing a STOP RUN or GOBACK while an input or output procedure is still running.
Check what is happening at your end. Without looking at program and abend-diagnosis information, it's hard to tell what happened there.

Re: Protection exception (System Completion Code=0C4).

PostPosted: Tue Sep 22, 2009 9:00 pm
by Anuj Dhawan
  • Just being nit picky -- What language are you using?
  • What is the precise error message -- copy using BBCode from the job?
  • Post the messages around the error message as well.
  • S0C4 is accompanied with a reason code. What is it?

Re: Protection exception (System Completion Code=0C4).

PostPosted: Thu Sep 24, 2009 8:21 pm
by shik.trip
Thanks for suggestion.
We are using PL1 as the programming language.
There is a strange error I noticed in the job spool as below:
$HASP375 $10MDM23 ESTIMATED LINES EXCEEDED
-$10MDMXX MDP123 S0020 1000 26019 7198 .01 .00 .1 22291
*TRACWARN - JOB $10MDMXX STEP# 15 S0020 COND CODE=1000 VERS=0921.0001

The error of protection exception was thrown during the step of the program,wherein the error is as below:

Condition Information for Active Routines
Condition Information for Library(PLI) (DSA address 0008E290)
CIB Address: 26A7F250
Current Condition:
CEE3204S The system detected a protection exception (System Completion Code = 0C4)
Location:
Program Unit: Library(PLI)
Entry: Library(PLI)
Statement: Offset: -269E88A6
Machine State:
ILC..... 0000 Interruption Code..... 0004

Thanks

Re: Protection exception (System Completion Code=0C4).

PostPosted: Fri Sep 25, 2009 12:54 am
by dick scherrer
Hello,

Did you look at the large output and see if the program is in a loop? Is this process supposed to generate a large number of printed lines?

It may be that the code has gone beyond some data area (an array perhaps) while generating this large amount of printout in the spool. Exceeding estimated lines does not cause an 0c4. . .

Re: Protection exception (System Completion Code=0C4).

PostPosted: Mon Sep 28, 2009 4:33 pm
by shik.trip
Thanks D,

This program handles a data not more than 30k or 40k lines of records which can be easily manageable.
The program just takes the input from a file,reads through the DB and generates the output.
nothing is to be printed in spool.

Re: Protection exception (System Completion Code=0C4).

PostPosted: Tue Sep 29, 2009 2:13 am
by dick scherrer
Hello,

nothing is to be printed in spool.
Possibly a terminology mis-cue - something is printed to the spool or there could not be "$HASP375 $10MDM23 ESTIMATED LINES EXCEEDED". It is possible that the "excessive" output is the dump.

Suggest you look at whatever is in the output queue and see what there is to be learned.

If may help if you post the first file for this job in the output queue - JESMSGLG.

Re: Protection exception (System Completion Code=0C4).

PostPosted: Wed Oct 07, 2009 8:41 pm
by shik.trip
I have the below piece of code in my program
DCL INPTR                      POINTER;   
DCL 1 OVER BASED(INPTR),                               
       3 SEQ_NO                       PIC'(6)9',         
       3 RECORD_TYPE             CHAR(03),         
       3 FILLER                       CHAR(375);         

 DCL 1 MDI2432  UNALIGNED BASED (INPTR),
       %INCLUDE MDI2432;       


It seems to me that this line of code is generating the problem as when I use the code as
DCL 1 MDI2432 UNALIGNED,
it works correctly but give me strange record output as ...............................
Also,the same line DCL 1 MDIXXXX UNALIGNED BASED (INPTR), is being used for other copybooks which works correctly but only this copybook ,it creates problem for protection exception.

Does anybody have a clue?
Thanks for the help.