Cobol sub-program question.

All sort of Mainframes Interview Questions.
Post Reply
Anil Khanna
Registered Member
Posts: 15
Joined: Wed Aug 07, 2013 12:09 am

Cobol sub-program question.

Post by Anil Khanna »

Hi,

Another question I've asked is: I have 100 subprogrames they are linked statically. I modify 90th and 95th sub-programs. Should I compile all the programs once again or I can just compile the 90 and 95th subprogram.

I answer only the 90, 95th and the main program should be compiled. Is this correct? If yes, can someone please explain more as I think it might be wrong as when programs are statically linked they will have a signle load module and compiling only the changed program will not link it any other sub-program (what if some sub-program is calling other sub-program). And if it is so, what's the benefir of having dynamic call? Can someone please explain in detail.
enrico-sorichetti
Global Moderator
Global Moderator
Posts: 826
Joined: Wed Sep 11, 2013 3:57 pm

Re: Cobol sub-program question.

Post by enrico-sorichetti »

Can someone please explain in detail.
unfortunately this is a HELP forum not a training one ...
furthermore no reason to rewrite what is clearly ( usually ) explained in the manuals
we will give suggestions and an overall explanation , up to you to meditate on the manuals for the details

as far as Your questions ...
the advantage of dynamic calls is that ( apart a small overhead when the subroutine7FUNCTION IS CALLED FOR THE FIRST TIME )
You will not have toRecompile the programs using it ( unless there is a change in passing the parameters.

the disadvantage is just an organizational one, IT WILL BE MORE DIFFICULT to track the subroutine usage.
( for static calls the source control package takes care of the tracking )

too bad that over the forums with IBM and mainframe in the name there is lots of confusion about compile ...
COMPILE is the process that given a source creates an OBJECT thingy
LINKAGE EDITOR ( LINK) is the process that takes OBJECTS thingies and builds an executable

so depending on the source control package , for static calls
the CHANGED SOURCES will be compiled
the program statically calling the changed subroutines might just be relinked
( but as I said all depends on the source control package customization )
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-)
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.”