I am trying to execute a call from a batch Cobol program to COBOL SLC (Single Line of code). The jcl abends with S0C4. The control goes to the program and abends as soon as I use Linkage section variables. I have used the same copy book to call and to receive in the claled program linkage. Can someone help me please?
soc4 is the storage voilation error. soc4 can occur due to the followings 1. an uncontrolle loop movement on the top of instruction referencing a field in a record of closed file. 2. referencing an item in linkage section where there was no parm in jcl. 3. calling/called programs have different length for items passed in linkage section. 4. an input or output procedure is still running.
these are the resons why we get soc4 error . check ur program with above conditions.