Page 1 of 1

For a static call, how the called program and a calling program link, each other.

Posted: Wed Oct 21, 2015 2:53 pm
by Sandeep Badal
Hi,

I was aksed this in an interview but I could not asnser this. Can you please help me: For a static call, how the called program and a calling program link, each other?

Re: For a static call, how the called program and a calling program link, each other.

Posted: Wed Oct 21, 2015 3:53 pm
by enrico-sorichetti
You were asked a pretty stupid question ...
what details did the interviewer want ?

a generic question like this one deserves a generic answer

a static call is resolved by the linkage-editor ( program-binder in the new terminology - NOT the db2 bind )

Re: For a static call, how the called program and a calling program link, each other.

Posted: Wed Oct 21, 2015 4:10 pm
by William Collins
enrico is correct with both points. In an interview, it can be very difficult to answer a general question specifically, as you don't know what is wanted. Ask for clarification or present a couple of divergent answers, or give a general answer.

In addition, the COBOL compiler generates different code for a static CALL than for a dynamic CALL. The linkeditor/program binder resolves the addresses for a static CALL. The dynamic CALL is resolved at runtime (ie the address is expected and processed in an entirely different way), with Language Environment handling the loading of the module (if not already done).

If you have access to a Mainframe at the moment, look at the code generated for both types of CALL.

Also, an interviewer may be a non-technical person, with a list of questions and expected answers only. Also, they may be technical, but it is not beyond the bounds of possibility that they are wrong (there are many "myths" in COBOL). Try to show what you know, that is relevant. If you actually know it, that doesn't mean just repeating something you read somewhere.

Don't be afraid to say "I don't understand the question" or "I don't know the answer you want" or even "I don't know the answer". It can be difficult, but beats being flat-out wrong (according to the interviewer).