how to solve soc 07 error..
how to solve soc 07 error..
Kiran,
There are a few techniques. I am assuming you have a CEEDUMP or an ABEND-AID report which shows which line your program failed with an 0C7.
0C7 is when you move an alpha character to a numeric field.
One way to solve is do a NUMERIC check before the MOVE statement.
Thanks,
-PK
Kiran,
In ABEND-AID it's having displacement of which field is giving the S0C7 abend.You copy the displacement from the ABEND-AID,after that find the displacement in compiled program SYSUT2.Then you will get the field name and initialize the field properly.Some times the displacement will come in between the range.At that time we can't able to find out the field name.So you can use the displacement in paragraphs.
Thank's
Loges
Kiran,
I guess the smarter way is to use xpeditor . Compile the program in xpeditor and then excute by pressing F12. cursor will stop in the line excatly where the Soc-7 is(particular line where the problem is). And the only thing remain is just cross verify that statement(may be move commands) and alter as per requirment and compile link.
Let me know in case of any concern.
Regards
soc7 abend happens when u r with datatype mismatch.ie,u may b trying 2 move a numeric value into a datatype declared as floating.this is just an example i said.just try whether there is any data type mismatch
Soc 7 abend is datatype mismatch.
Example:
77 A PIC X(005) VALUE "INDIA".
77 B PIC 9(005).
Move A TO B
The "INDIA" data move to B. That time we got soc 7 abend.
SOC7 happens most frequently in cases of data mismatch.
For eg,
W-RT-AGE PIC 99
Now if u move a value 100 into this field, a SOC7 abend would occur.This is just one example of data mismatch.You can use a debugger tool to find the point of abend in the COBOL program.