View previous topic :: View next topic
|
Author |
Message |
rajivtechno
New User
Joined: 05 Apr 2005 Posts: 17 Location: Bangalore
|
|
|
|
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 |
|
|
rameshbabu Warnings : 1 New User
Joined: 23 May 2005 Posts: 27
|
|
|
|
check the compiler options properly you might have using the NODYNAM option |
|
Back to top |
|
|
DavidatK
Active Member
Joined: 22 Nov 2005 Posts: 700 Location: Troy, Michigan USA
|
|
|
|
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 |
|
|
krishnaiahc
New User
Joined: 31 Aug 2005 Posts: 21
|
|
|
|
Hai,
Please check the sending and receiving field of the sub-program. It may have discrepancies.
Thanks,
Krishna |
|
Back to top |
|
|
suman_236
New User
Joined: 18 Nov 2005 Posts: 11 Location: Chennai
|
|
|
|
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 |
|
|
|