Page 1 of 1

S0C4 USER=0000 REASON=00000004

PostPosted: Tue Jul 03, 2012 7:54 pm
by utpalpal07
Hi All,

I'm running a code. which is manually triggered by a TCP/IP connection. If I compile and link it to my environment it gives me SOC4.

  PSW AT TIME OF ERROR  078D0000   8000A270  ILC 4  INTC 04
    ACTIVE LOAD MODULE           ADDRESS=00007F98  OFFSET=000022D8
    NAME=PFMB970
    DATA AT PSW  0000A26A - 18204353  10008850  00044254
    GR 0: 0000A940   1: 00000000
       2: 0000A140   3: 00000800
       4: 00001000   5: 00000000
       6: 00000000   7: 00000000
       8: 00000000   9: 0000A9CF
       A: 00000000   B: 0000A940
       C: 00009F5C   D: 0000BA20
       E: 8000A15E   F: 8000A25A
  END OF SYMPTOM DUMP
 IEF472I PKCO0072 UFM97001 UFM97001 - COMPLETION CODE - SYSTEM=0C4 USER=0000 REASON=00000004



can anyone suggest what should be done to avoid this error ?

Regards
Utpal

Re: S0C4 USER=0000 REASON=00000004

PostPosted: Tue Jul 03, 2012 8:51 pm
by dick scherrer
Hello,

Hopefully, you realize you have posted nothing we can use to help you . . .

Does the same program run successfully when run locally insteead of being initiated via tcp/ip?

Is this a program you have written?

Once into the system, how is it run (online, batch, ???)?

Was the module successfully linked (no unresolved entries)?

Re: S0C4 USER=0000 REASON=00000004

PostPosted: Tue Jul 03, 2012 8:55 pm
by Robert Sample
can anyone suggest what should be done to avoid this error ?
Avoid? NO.

However, to FIX this error you need to identify where the program is attempting to access storage that it does not have access to. Use the error messages output to identify the line of code and use that line of code as an indicator. Unfortunately, depending upon the program itself, it is possible that storage was corrupted many instructions away and was just uncovered when you got the abend.

Re: S0C4 USER=0000 REASON=00000004

PostPosted: Tue Jul 03, 2012 8:59 pm
by steve-myers
An S0C4 ABEND is triggered in response to program interruption codes 4, X'10', and X'11'. These interruption codes are created by the hardware if your program attempts to access or write storage it is not authorized to read or write. It is an error in your program, which you must locate and correct.

The indicitive dump shows the location of the error, expressed as the virtual address of the failing instruction, and an attempt to provide the offset of the instruction in your program. It also shows storage from 6 bytes before the address in the PSW to 6 bytes after the address in the PSW. From this it appears the failing instruction is X'43531000'. How I deduced this is an exercise for you. I don't have all the op-codes memorized, but I think this is IC 5,0(3,1). Glancing at the registers, I see that register 1 is binary 0s and register 3 is X'00000800', so your program is attempting to read the contents of storage at X'00000800'. This not allowed by low storage protection, hence the S0C4.

Based on 40+ years of doing this, there is a good chance this is all you need to resolve this problem.

Good luck.