Home > Software > Mainframe > Cobol
Interview Questions   Tutorials   Discussions   Programs   

Cobol - How to resolve the soc4 & soc7 ?

    Next Topic

asked mar August 2, 2014 11:41 PM  

How to resolve the soc4 & soc7 ?


2 Answers

answered By Mswami   0  
There are various reasons for SOC4 & SOC7.
SOC4 abend may be due to the following reasons.
1.Missing SELECT statement ( During Compile time)
2.Bad Subscript/Index
3.Read/Write attempt to unopened file
4.Move data to/from unopened file
5.Missing parameters in called subprogram
6. Protection exception, usually caused by an invalid index and subscript to an array
SOC7 abend may be due to the following reasons:
1.Numeric Operation on Non-numeric data
2.Coding past the maximum allowed subscript.
3.Un-initialize working storage.
4. Caused due to bad data, in case of numeric data we are moving non-numeric,in case of numeric comparison we are finding space
In general, SOC4 could be resolved, You have to look at the dump and note down the offset address.Then check the instruction with this offset address in the program compilation output.
SOC7 Could be resolved by checking the sysdump and copy the offest address then correct it in the program. 
   add comment

answered By sunny   0  
Generally SOC-7 occurs due to data mismatch between source and destination fields.
Passing non numeric data in to numeric fields .

We can
resolve SOC-7, by going to spool, check sysdump and copy offset
value,than come to jcl,in command line type F Offset value
then press f5 ,you will get location where the error, then
correct it..

This below steps may help you.

1. check spool details of run job.
You will find a line similar to following.

offset +00000AB6 at entry offset +00000AB6

copy last 4 bytes of offset i.e., copy 0AB6

2. go to spool details of compile job.
go to sysprint
find 0AB6
you can find the statement as shown in below example.

00345 MOVE
000SE0 5830 9134 L 3,308(0,9) BLF=0
000ER0 5840 9138 L 4,312(0,9) BLF=1
000AB6 F944 3000 4000 CP 0(5,3),0(5,4) NUMBER-X

Just few lines above the line, where you have found 4 digit offset number, you can find the cobol verb , that is where COBOL program abended with SOC7. In above example, cobol program abended with SOC7 at MOVE statement.

   add comment

Your answer

Join with account you already have



 Write A Tutorials
Online-Classroom Classes

  1 person following this question

  3 people following this tag

  Question tags

cobol × 1

Asked 2 years and 3 months ago ago
Number of Views -9242
Number of Answers -2
Last updated
3 years and 4 months ago ago

  Similar questions

Ready to start your tutorial with us? That's great! Send us an email and we will get back to you as soon as possible!