Page 1 of 1

Is the program called statically or dynamically?

Posted: Thu Nov 19, 2015 12:16 pm
by Vijay Chikala
Hello,

This is another question which I founf weird...how can one identify by seeing the program that it is called statically or dynamically? I don't know if there is a way. Both type of sub program will have PROCEDURE DIVISION USING... but will there be something different than this?

After searching I got to know that, if the called program is given in double quotes it is static call, like:

Code: Select all

CALL "sub-program" using some-paramerters
And if the called program name is moved to a variable. It's dynamic

Code: Select all

MOVE "sub-program" to WS-variable. 
CALL WS-variable using some-parameters.
Is it correct?

Re: Is the program called statically or dynamically?

Posted: Thu Nov 19, 2015 12:52 pm
by enrico-sorichetti
...how can one identify by seeing the program that it is called statically or dynamically
You can find out if the CALLER call something statically or dynamically

but You cannot do it just looking at the CALLED program

Re: Is the program called statically or dynamically?

Posted: Thu Nov 19, 2015 2:39 pm
by William Collins
By just looking at the program source it is impossible to tell whether a CALL will be static or dynamic for a CALL "literal" because it is a compiler option which determines that.

Re: Is the program called statically or dynamically?

Posted: Fri Nov 20, 2015 4:47 pm
by Anuj Dhawan
Somehow I find this question very aimless! If I'd know a way to tell that the program is called statically or dynamically by looking at code then <pause> okay I know it now but what is next? How this information which is being asked can be used further in some constructive way?! Even if there is no way by simply looking at program, well, I'll know it if I'll need to know, no?

Re: Is the program called statically or dynamically?

Posted: Fri Nov 20, 2015 5:35 pm
by enrico-sorichetti
the question in se is useless,
but the interviewers have to ask something

Re: Is the program called statically or dynamically?

Posted: Fri Nov 20, 2015 6:37 pm
by William Collins
Interviewers seem to think it is a question which separates the COBOL Men from the COBOL Boys. There is no practical benefit in knowing the answer.

Although the question can be easily located by search-engineing, I'd guess there are also wrong answers out there.

Re: Is the program called statically or dynamically?

Posted: Fri Nov 20, 2015 8:56 pm
by enrico-sorichetti
asking obscure questions is a way for the interviewers to tweak the interview results

Re: Is the program called statically or dynamically?

Posted: Thu Dec 31, 2015 12:29 pm
by Vijay Chikala
William Collins wrote:Interviewers seem to think it is a question which separates the COBOL Men from the COBOL Boys. There is no practical benefit in knowing the answer.

Although the question can be easily located by search-engineing, I'd guess there are also wrong answers out there.
Are there some COBOL Women and COBOL Girls out there? :D What did you mean by Men and Boy?

Re: Is the program called statically or dynamically?

Posted: Thu Dec 31, 2015 2:37 pm
by William Collins
Just the usual.

It is not possible that the enforced corruption of the English language to impose specific gender on non-gender-specific use of specific gender words means that people can't understand each other any more?

Sad, but I guess it is possible.

I'll note for future reference that whatever words you use mean what I intend instead of what you intend (check out Alice and Humpty Dumpty) so expect me not to take any notice of what you write and to admire the confusion of others who blithely take your words at face value. Happy New Year.

Re: Is the program called statically or dynamically?

Posted: Thu Dec 31, 2015 2:47 pm
by Vijay Chikala
William Collins wrote:Just the usual.

It is not possible that the enforced corruption of the English language to impose specific gender on non-gender-specific use of specific gender words means that people can't understand each other any more?

Sad, but I guess it is possible.

I'll note for future reference that whatever words you use mean what I intend instead of what you intend (check out Alice and Humpty Dumpty) so expect me not to take any notice of what you write and to admire the confusion of others who blithely take your words at face value. Happy New Year.
I have not understood it all but I hope I have not destroyed my opportunity to get future answers on this board?