Page 1 of 1

Cobol Call fails with S0C4

PostPosted: Mon Aug 06, 2007 12:05 pm
by cobol_user
Hi,

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?

Thanks...

Re: Cobol Call fails with S0C4

PostPosted: Mon Aug 06, 2007 12:19 pm
by CICS Guy
How about a sample of your CALL and USING?

Re: Cobol Call fails with S0C4

PostPosted: Mon Aug 06, 2007 12:26 pm
by cobol_user
CALL WS-PROGRAM-NAME USING COMM-AREA
END-CALL

Re: Cobol Call fails with S0C4

PostPosted: Mon Aug 06, 2007 1:05 pm
by CICS Guy
CICS Guy wrote:How about a sample of your CALL and USING?

I deserved that....Please post more information, like the call (done) and the data areas being passed.
Please post the called program's linkage and usings.

Re: Cobol Call fails with S0C4

PostPosted: Sat Dec 22, 2007 4:07 pm
by vasanthamugi
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.

if i am wrong i m sorry please correct me.