Is the program called statically or dynamically?

All sort of Mainframes Interview Questions.
Post Reply
Vijay Chikala
New Member
Posts: 8
Joined: Tue Jan 13, 2015 3:26 pm

Is the program called statically or dynamically?

Post 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?
enrico-sorichetti
Global Moderator
Global Moderator
Posts: 826
Joined: Wed Sep 11, 2013 3:57 pm

Re: Is the program called statically or dynamically?

Post 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
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort 8-)
William Collins
Global Moderator
Global Moderator
Posts: 490
Joined: Sun Aug 25, 2013 7:24 pm

Re: Is the program called statically or dynamically?

Post 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.
User avatar
Anuj Dhawan
Founder
Posts: 2802
Joined: Sun Apr 21, 2013 7:40 pm
Location: Mumbai, India
Contact:
India

Re: Is the program called statically or dynamically?

Post 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?
Thanks,
Anuj

Disclaimer: My comments on this website are my own and do not represent the opinions or suggestions of any other person or business entity, in any way.
enrico-sorichetti
Global Moderator
Global Moderator
Posts: 826
Joined: Wed Sep 11, 2013 3:57 pm

Re: Is the program called statically or dynamically?

Post by enrico-sorichetti »

the question in se is useless,
but the interviewers have to ask something
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort 8-)
William Collins
Global Moderator
Global Moderator
Posts: 490
Joined: Sun Aug 25, 2013 7:24 pm

Re: Is the program called statically or dynamically?

Post 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.
enrico-sorichetti
Global Moderator
Global Moderator
Posts: 826
Joined: Wed Sep 11, 2013 3:57 pm

Re: Is the program called statically or dynamically?

Post by enrico-sorichetti »

asking obscure questions is a way for the interviewers to tweak the interview results
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort 8-)
Vijay Chikala
New Member
Posts: 8
Joined: Tue Jan 13, 2015 3:26 pm

Re: Is the program called statically or dynamically?

Post 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?
William Collins
Global Moderator
Global Moderator
Posts: 490
Joined: Sun Aug 25, 2013 7:24 pm

Re: Is the program called statically or dynamically?

Post 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.
Vijay Chikala
New Member
Posts: 8
Joined: Tue Jan 13, 2015 3:26 pm

Re: Is the program called statically or dynamically?

Post 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?
Post Reply

Create an account or sign in to join the discussion

You need to be a member in order to post a reply

Create an account

Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute

Register

Sign in

Return to “Interview Questions.”