Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
SOC 4 Error on the Dynamic Call statement

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
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    Post subject: SOC 4 Error on the Dynamic Call statement
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    Post subject: Re: SOC 4 Error on the Dynamic Call statement
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    Post subject: Re: SOC 4 Error on the Dynamic Call statement
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    Post subject:
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts -502 Error - Cursor already open anand jeyapaul DB2 7 Sun Oct 29, 2017 4:22 am
No new posts COBOL - EXIT statement weird behavior anthony.pangestu COBOL Programming 0 Fri Oct 27, 2017 9:57 am
No new posts IEW2456E error when link-editing a C ... Senthilraj JCL & VSAM 0 Fri Oct 13, 2017 3:12 pm
No new posts FTP Skip or ignore error and process ... AJAYREDDY All Other Mainframe Topics 3 Wed Sep 27, 2017 8:12 pm
No new posts Assembler Macro Copybook converted to... Ziquilix PL/I & Assembler 4 Tue Sep 26, 2017 3:07 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us