IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

SOC 4 Error on the Dynamic Call statement


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
rajivtechno

New User


Joined: 05 Apr 2005
Posts: 17
Location: Bangalore

PostPosted: Tue Dec 06, 2005 3:11 pm
Reply with quote

I am using Dynamic call statement in my COBOL DB2 program and it resolves to SOC4 error.

I have checked the dynam option, list of arguments and their data length in the linkage section. Everything works out correct but still its showing SOC4 for the CALL statement.

Please do help me out resolving this issue
Back to top
View user's profile Send private message
rameshbabu
Warnings : 1

New User


Joined: 23 May 2005
Posts: 27

PostPosted: Tue Dec 06, 2005 6:52 pm
Reply with quote

check the compiler options properly you might have using the NODYNAM option
Back to top
View user's profile Send private message
DavidatK

Active Member


Joined: 22 Nov 2005
Posts: 700
Location: Troy, Michigan USA

PostPosted: Tue Dec 06, 2005 9:18 pm
Reply with quote

rajivtechno,

If my guess is right, the subroutine is not in the system libs, steplib or joblib when you execute the call. Check this and let us know.
Back to top
View user's profile Send private message
krishnaiahc

New User


Joined: 31 Aug 2005
Posts: 21

PostPosted: Tue Dec 06, 2005 10:13 pm
Reply with quote

Hai,

Please check the sending and receiving field of the sub-program. It may have discrepancies.

Thanks,
Krishna
Back to top
View user's profile Send private message
suman_236

New User


Joined: 18 Nov 2005
Posts: 11
Location: Chennai

PostPosted: Tue Dec 06, 2005 11:29 pm
Reply with quote

rajiv-
i got S0C4 in a similar scenario sometime back. There can be many reasons for a S0C4, let me explain my scenario....

The problem was - Amode 31, Rmode 31 program was dynamically calling a Amode 24, Rmode 24 program.

In general case, when you make call from A-31 R-31 to A-24 R-24 program, the proc identifies the discrepancy and abends the program (not with S0C4). The sysout will give you the exact reason - 'calling a Amode-24 program from Amode-31 program'.

As I said above, this scenario results in a system abend but not S0C4. I was getting a S0C4 because, in between calling and calling program, there was a bridge program called T60000 which was an assembler program to convert a static call to dynamic. I.e Calling program makes a static call to T60000 and T60000 makes a dynamic call to Called program.

T60000 is an assembler Amode-24 program and it can't recognise any adresss passed by Amode-31 program. Therefore it populates the adress with low values. (Low values address holds OS data). When the called program tries to access OS data, it results in S0C4.

The solution is to compile the called program with A-31, R-31 modes.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Error to read log with rexx CLIST & REXX 11
No new posts Error when install DB2 DB2 2
No new posts CLIST - Virtual storage allocation error CLIST & REXX 5
No new posts Using Dynamic file handler in the Fil... COBOL Programming 2
No new posts Error while running web tool kit REXX... CLIST & REXX 5
Search our Forums:

Back to Top