We have static linking in our project. I have a COBDB2 program "B" which is called by another COBOL DB2 program "A". Program "A"
has a link "LA"
Now if I make changes to program B, what all steps should I do in order to get the changes picked successfully.
Which of the following is the correct option:-
1) Precompile, Compile program B, process the link of A and bind program B.
2) Precompile, Compile program A, process the link of A and bind program B.
3) Precompile, Compile program A and B, process the link of A and bind program A and B.
"; ; ; ;
Steps to ensure that program a calls the latest version of program B.
method 1: pre-compile, compile, bind and link-edit program B. Re link-edit program A.
method 2: pre-compile, compile, bind and link-edit program B. pre-compile, compile, bind and link-edit program A.
Method 3: (My preferred method) change to dynamic linking. Change program A: change the "CALL 'B' " to "MOVE 'B' to WS-PGM CALL WS-PGM" This will ensure that the call to B is dynamic. pre-compile, compile, bind and link-edit program A. pre-compile, compile, bind and link-edit program B.
I think the answer is option (1).
Since COBDB2 program B is changed it would require compiling & bind, and to pick the changes the link of A should be reprocessed in case of static linking.