I HAVE WRITTEN A COBOL PROGRAM WITH DB2 ATTACHED.
I WAS ABLE TO COMPILE IT SUCCESSFULLY.
GOT THE PLAN AS WELL AS LOAD MODULE.
BUT I AM NOT ABLE TO RUN THAT.
IN RUN JCL I HAVE INCLUDED ONLY THE LOAD MODULE AND I AM GETTING AN ABBEND OF S0C1.
PLEASE TELL ME WITH A SAMPLE JCL HOW TO RUN THIS PROG.
SOC1 is basically Protection error . It can occur due to bad memory area access by a program.
Possible situation for this error may be :
1) Bad reference of memory.
2) Wrong LRECL in program as respect to JCL (this could also be reason .. once i encountered )
3) If occurs clause is used in your program than out of subscript could result in SOC1.
4) If redefine clause is used in your program than it could also result in SOC1.
S0C1 is an operation exception. It means that the location the PSW is pointing to (where the CPU is about to execute an instruction) doesn't have a valid instruction in it. You've either branched out of your program to a place that doesn't have a valid instruction or you've somehow destroyed some code in your program. It can be caused by several things - one is dropping out the bottom of a program. It used to be caused by trying to read from an unopened file, but the indication of that has now changed. A static call to a program that wasn't link edited with you used to cause it also. If you have a runaway subscript while building a table, you can also overlay parts of your program, but that's usually caught by a compiler option to check for out of bounds subscripts.