S0C4 Abend

S0C4 Abend

What is a S0C4 Abend?

S0C4 Abend is a protection exception when a virtual address cannot be mapped with a physical address.

When S0C4 Abend occurs

  • An Invalid address referenced due to subscript error
  • In a group Move the length of the receiving field was defined incorrectly
  • Moving variable length record which is larger than the receiving field’s length.
  • Read/Write a file which has not been opened in the program.
  • Read/Write a file after EOF.
  • Invalid parms passed through linkage section.
  • Used DD dummy with logic that moves high values to FD at end of read.
  • Tried to use CALL within COBOL SORT Input output procedure
  • Using GOBACK in COBOL SORT output procedure

How to Resolve S0C4?

; ; ; ;

  • You can check for missing SELECT statements in COBOL program
  • You can check if there are any un initialized indexes or subscripts in the program.
  • You can check if the program is reading any file which is not opened.
  • You can check if the program is missing SELECT ASSIGN clause
  • You can check if the LRECL matches with the length of file specified in file descriptor in COBOL.