Explain the process of resolving soc4& soc7 errors?

Showing Answers 1 - 22 of 22 Answers


  • Dec 22nd, 2005

Steps taken to resolve to resolve S0C7

1. Get the offet of the abend from sysout

e.g lets say the offset is 0005DA

2. Go the compile listing and locate the offset. This will be present in the assembly listing of the program.

000067  MOVE                                                                  
   0005D6  4820 8018               LH    2,24(0,8)               WS-COMP      
   0005DA  4E20 D100               CVD   2,256(0,13)             TS2=0        
   0005DE  F332 8020 D105          UNPK  32(4,8),261(3,13)       WS-DEST      
   0005E4  96F0 8023               OI    35(8),X'F0'             WS-DEST+3    
000068  DISPLAY                                                               
   0005E8  5820 905C               L     2,92(0,9)               TGTFIXD+92   
   0005EC  58F0 202C               L     15,44(0,2)              V(IGZCDSP )  
   0005F0  4110 A1F6               LA    1,502(0,10)             PGMLIT AT +490
   0005F4  05EF                    BALR  14,15                                
000069  DISPLAY                                                               
   0005F6  58F0 202C               L     15,44(0,2)              V(IGZCDSP )  
   0005FA  4110 A1E0               LA    1,480(0,10)             PGMLIT AT +468
   0005FE  05EF                    BALR  14,15                                  

3. Get the statement number from the listing, here the offet 0005DA is the expansion for the statrement number 000067.

4. Using the statement number obtain the statement.

which would be something like this:

000067                       MOVE WS-COMP TO WS-DEST. 

Now this is the problematic statement.

Look in to this to resolve the abend.

Hope this helps.




  • Jan 16th, 2006

why do we get this abends??  . whats the process to resolve soc4 abend?/

  Was this answer useful?  Yes


  • Jan 18th, 2006

S0C4 may be due to 1.Missing Select statement(during compile) 2.Bad Subscript/index 3.Protection Exception 4.Missing parameters on called subprogram 5.Read/Write to unopened file 6.Move data from/to unopened file 6. Trying to delete a file which is in production (or to be more precise – trying to delete a dataset which has no access by the user to delete that particular dataset)

  Was this answer useful?  Yes


  • Jan 24th, 2006

Still am unable to resolve SOC4. Could anyone reply to this.

  Was this answer useful?  Yes

Mary Vijaya

  • Jan 28th, 2006


Soc4 occurs when the program tries to retrieve the element which is


  • Feb 28th, 2006

Hi Geetha,

Great to c ur answer. Good and simple explanation to resolve SOC7.






  • Mar 16th, 2006

Hi geeta,

                your answer is simple and very clear.


  Was this answer useful?  Yes


  • May 11th, 2006

Hi Getha,

            Nice explanation for SOC7. Thanks


  Was this answer useful?  Yes

Deba Misra

  • Jun 12th, 2006

Hello All,

Its a nice explanation about the S0C7 abend.

well, i need to know one more thing, please explain me.

Suppose, I have an Input file(recieved from Client on daily basis). we have a mapping program, so that before processing the file, we can know if there is any Bad data.

My query is,

The Input file contains  5000 records and two of them give S0C7 abend.By using the Offset value in Sysout i got which field gives the abend. Can anybody tell me, how to get which exact records give the S0C7 error?

if i use file-aid i may get the bad record but it will take a long time to go thru all 5000 recs. is there any short/easy way to know about the Bad records?

Thanks in advance...

Deba Misra

  Was this answer useful?  Yes


  • Jul 1st, 2006

as explained  earlier regarding the s0c7 by some of our predecessors.I follow a list of stepd to b followed to trac the error.

1) once u get rthe offset value track the statement and check the variables tthat r getting used in the statement

2) previous to the statement write  a display command with the corresponding fields that cause to soc7.

ex: move x to a b c

in the above staement if soc7 occurs u write a display statement above to move statement

display a b c

move x to a b c

  Was this answer useful?  Yes


  • Jul 27th, 2006

hi Sharmila

Thanks for your explanation about SOC4 & SOC7.



  Was this answer useful?  Yes


  • Aug 15th, 2006

Hi GeethaThanks for giving answer

  Was this answer useful?  Yes

Any kind of 0Cx is a message code for exception. The different code depends on different reasons for it. For instance:

0C4:1)Protection exception;2)Segment-translation exception;3)Page-translation exception;

0C7: Data exception.

The resovle process was explained in previous feedback. That's very detail and understandable.

  Was this answer useful?  Yes


  • Dec 12th, 2006

hey Geetha,

ur reply was of great help..thanx

  Was this answer useful?  Yes

rajendra prasad

  • May 9th, 2007

For Soc4 you need to see whether any mismatch DD attributes between Cobol program and Run JCL i.e any missed DD satements or mismatch attributes between Cobol and JCL. If you are using Table handling make sure that it's won't access outside Table (outside boundry)

  Was this answer useful?  Yes


  • Jul 20th, 2008

To get the bug records, put display statement of the key/acc no of the file before the statement where (in the program) it is abending ; it will give you the list of accounts in spool.

other wise you have to see in the dump; there will be value populated; but you have to know how to read dump datas.


  • Jan 14th, 2009

The only simple solution i can think of is, try expediting the code and press F12. Its should abend and stop at the problem statement.

This would give you the record details and values you need to identify the bad record.

Once you have noted it out, just correct the values required to complete the flow and press F12 again. If you have another bad record, it will stop exactly at the point which leads to ABEND.

Thus you can identify both the bad records this way.

Thanks, hope it is useful.

  Was this answer useful?  Yes

Hi friends,

just keep the disposition as DISP=( , CATLG,CATLG) your file will process the up to the good record and from the abended record wont processes. i.e
if the file contains 5000 records and the 393th record is bad record, the o/p file processes up to 392 record only & remaining will not processed.

if any mistakes are there please excuse me friends

  Was this answer useful?  Yes


  • Sep 4th, 2015

Hi Srinivasulu. you are right. Also, you can find the error record. you can get the error record from ABENDAID. Search for Current record in ABENDAID and locate that record in Input file. In production support I suggest to skip the error record and process the rest of the records if timing taking to correct the error record.

  Was this answer useful?  Yes


  • Aug 7th, 2016

Could you please elaborate more on how to check error record and skip for SOC7. Is there quick solution to skip these records

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.


Related Answered Questions


Related Open Questions