MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

S0C4 abend while calling a subroutine

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming
View previous topic :: View next topic  
Author Message
pradeepg
Beginner


Joined: 06 Jan 2003
Posts: 25
Topics: 12
Location: Columbus, OH

PostPosted: Tue Aug 09, 2005 8:33 am    Post subject: S0C4 abend while calling a subroutine Reply with quote

Hi,

We got a COBOL/DB2 load module from another application and we are trying to call that from a program we wrote. We are encountering S0C4 abend. In debug mode I can see the linkage section variables populated correctly before calling the program but when the control passed to called program the linkage section is having garbage (at least not the right values) and abending with S0C4 even before it reaches the Procedure division.

Any pointers ??

Thanks in advance.

- Pradeep
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Tue Aug 09, 2005 8:37 am    Post subject: Reply with quote

pradeepg,

check if any of the following are applies to your pgm
Code:

Possible causes for this abend include:                     
                                                             
COBOL: Invalid address was referenced due to subscript error
       or bad parameter passed                               
       In group move, receiving record variable length       
          defined incorrectly                               
       Tried moving variable length record that was larger   
          than target field size                             
       Tried to read or write a file which was not open     
       Used DD DUMMY with logic that moves high values to   
        FD                                                   
       Tried to call within COBOL SORT I/O procedure         
       Tried to "goback" in the SORT output procedure       
                                                             


Hope this helps...

Cheers

kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Cogito-Ergo-Sum
Advanced


Joined: 15 Dec 2002
Posts: 637
Topics: 43
Location: Bengaluru, INDIA

PostPosted: Tue Aug 09, 2005 9:51 am    Post subject: Reply with quote

Pradeep,
Can you post the structures used here?
_________________
ALL opinions are welcome.

Debugging tip:
When you have eliminated all which is impossible, then whatever remains, however improbable, must be the truth.
-- Sherlock Holmes.
Back to top
View user's profile Send private message
pradeepg
Beginner


Joined: 06 Jan 2003
Posts: 25
Topics: 12
Location: Columbus, OH

PostPosted: Wed Aug 10, 2005 9:43 am    Post subject: Reply with quote

As suspected it was the inconsistency in linkage section.
Thanks a lot for your pointers
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group