Page 1 of 1

Dynamic call abend with 0C4

PostPosted: Wed Nov 14, 2018 1:52 am
by huxianjun
Hello

I'm trying to Xpediter debug from Cobol program A calling program B with the codes like below:
Prog A:
. . .
CALL WS-PROG-B USING WS-PARMS
. . .

However, it abended with 0C4 when executed the above statement. Then, I changed it to static call as below and it worked fine that I can get into the source codes of PROG-B and debug line by line:
CALL 'PROG-B' USING WS-PARMS

Can anyone help me to understand what difference made by changing from dynamic to static call thus the Xpediter debug worked fine for static call?


Thanks, Roy

Re: Dynamic call abend with 0C4

PostPosted: Wed Nov 14, 2018 2:04 am
by Robert Sample
what difference made by changing from dynamic to static call
A dynamic call means the COBOL program goes into the load library (STEPLIB or whatever) to find the subprogram load module, loads it, and executes it. A static call means the subprogram load module has been linked into the calling program's load module so there is no requirement to go into the load library. There are implications for Xpediter, obviously.

Re: Dynamic call abend with 0C4

PostPosted: Wed Nov 14, 2018 3:45 am
by huxianjun
Thanks Robert!

Guess the difference is the addressing of the PROG-B being called?

Re: Dynamic call abend with 0C4

PostPosted: Wed Nov 14, 2018 4:30 am
by Robert Sample
Looking on the Internet, I see that if you want to debug program B (the subprogram) when there is a dynamic call, you need to break program A at the CALL statement and issue Xpediter command SOURCE B to be able to see the source of program B. The S0C4 abend means you're attempting to access storage you are not allowed to access. There are a variety of possible reasons (one example: program A has 31-bit addressing while program B is using 24-bit addressing and A passes a parameter to B).