There is a production file which has millions of records in
it.The program that uses it ends up with an SOC7 abend.It
is sure that the abend is due to some invalid data in the
file.Is there any way to debugg the SOC7 abend with out
giving displays? I need the record which is cause for the
abend.

Answers were Sorted based on User's Feedback



There is a production file which has millions of records in it.The program that uses it ends up wi..

Answer / prakash

We can track this S0C7 in couple of ways without issuing
display statement

* Using abend log SYSABEND. GO the abend log in the spool
and search for CURRENT RECORD . Under this heading the
abendlog will show you the current record that has caused
the abend in hexa decimal format.

* Using Disp parameter. Suppose if your applicaton program
reads the data from an input file and after processing if
it writes ouput data to another file this method could be
used. Give the disp parameter as new,catlg,catlg for the
output dataset.By doing so when ever the job abend with
S0C7 we could see the last sucessfully processed record in
the output file.With that info we can track the
corresponding record in the input file and the next record
to that is the one causing the abend

Is This Answer Correct ?    25 Yes 1 No

There is a production file which has millions of records in it.The program that uses it ends up wi..

Answer / ramesh

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.

Regards

Rameshkumar.H.K,Belgaum Karnataka.
Infosys Technology Bangalore

Is This Answer Correct ?    12 Yes 6 No

There is a production file which has millions of records in it.The program that uses it ends up wi..

Answer / necron

Go to the xpeditor tool and press f12 ..it will
automatically stop at the record which causes S0C7 abend..
(or) you can have a look at the program dump...you will
have an abend offset address in dump which will pinpoint
where exactly the abend occurred.

Is This Answer Correct ?    7 Yes 5 No

There is a production file which has millions of records in it.The program that uses it ends up wi..

Answer / suresh

1.Go to sysout it showing the program which is abened with number.
Open the program in changeman listing . go to the line no.
In that line no some variables used.
Take the variable and go to CEEDUMP .find the variable.Definitely the vaiable having the invalid value.Find the group level.You can see the key.
That record causing the SOC7 Abend

Is This Answer Correct ?    2 Yes 1 No

There is a production file which has millions of records in it.The program that uses it ends up wi..

Answer / necron

Yes , the disp can be (new,catlg,keep) or (new,keep,keep)

However its a very uncoventional method to look at the
input file and determine which record is causing it.what
i'm saying here is you can determine the input record but
not the field.You may have to again goto the debugger
xpeditor to see what happens during that record.

Is This Answer Correct ?    0 Yes 0 No

There is a production file which has millions of records in it.The program that uses it ends up wi..

Answer / srivatsa

Pick up the offset address from the executed JCL. Go to
the compiler cross reference listing. Find the offset
address in the XREF. This would give the line number in
which the abend has occured. To identify the record which
caused abend get into the sysout where the abended record
information would be displayed depending on the
installation. Through this when we map it to the record
structure we will come to know which field is caused the
abend. From this we can fix the SOC7 abend.

Is This Answer Correct ?    0 Yes 0 No

There is a production file which has millions of records in it.The program that uses it ends up wi..

Answer / harish

HI PRAKASH,

U ARE RIGHT..

I JUST WANT TO CONFIRM ABOUT DISP PARAMETER

I HOPE ITS DISP=(NEW,KEEP,KEEP)

SO WHY WE WANT TO WASTE I/O

IF ABNORMAL TERMINATION ITS KEEPS THE WRITTEN RECORDS TILL
POSITION OF SOCO7,SO WE CAN TRACE OUT AT WHICH RECORD IT
STOPS WRITING..

TAKE THAT RECORD PUT IN XPEDITIOR,TEST ...RESTART

pls correct me if anything wrong

HARISH POOMGAME SHIVAPPA(hassan,karnataka)
NIIT TECHNOLOGY
KOLKATA

Is This Answer Correct ?    0 Yes 1 No

There is a production file which has millions of records in it.The program that uses it ends up wi..

Answer / hi

We can easily do it by looking into SYSABEND. There you
can find the last record and last executed statement. These
two information is enough to solve S0C7.

Is This Answer Correct ?    1 Yes 4 No

Post New Answer

More COBOL Interview Questions

How to Write the RESTART Logic Using COBOL?

4 Answers   GalaxE, L&T, Syntel, TCS,


I have a COBOL main program which is calling sub program, the number of calling parameters used in main program are 4 whereas in sub program it's 5. Sub program is passing 5 parameters back to main program Will there be any compilation error? Or main program parameters displays junk values?

1 Answers  


Write the syntax of a two dimensional array?

8 Answers   Honeywell, Xansa,


What do you do to resolve SOC-7 error?

2 Answers   Sun Life, Wipro,


how to move the records from file to array table. give with code example

0 Answers   ADP, Syntel,






What is Static and Dynamic linking ?

3 Answers  


Write down the divisions of cobol program?

0 Answers  


What is difference between static and dynamic call in cobol?

0 Answers  


What is Redefines clause?

8 Answers  


i have n records in one file and in this file there is some fields and i want to count that how many sharma in my file so plz give the coding that how we read sharma ?

2 Answers  


I have 2 dimensional array with having 100 elements. So how to find the 11th item in an array?

6 Answers   IBM,


what is sort? whis is internal & external sort ?when do u go for inter sort & external sort? tell about some sort utilites?

2 Answers   BirlaSoft,


Categories