MAINFRAME - TIP OF THE DAY :
Q. If there is a situation, where we need to code more than 255 steps in a JOB?
A. We need to split jcl into two jcls , at the end of the first jcl check the condition code and initiate the second jcl.
Programmers Voted for below topics. Please Vote for good Posts.
Thank You! for your feedback. Connecting to the server. Please Wait...
NOTE : The called subroutine is a literal, it is called in quotes.
01 WS-SUBPGM PIC X(8) VALUE 'PGMNAME1'.
CALL WS-SUBPGM USING arguments
NOTE : There are lot of advantages and disadvantages of STATIC VS DYNAMIC calls.
It depends on the scenarios what we are dealing in specific.
Say we have a program A which is calling a sub routine B.
Lets assume the call is STATIC , When an executable is build for PGM A
the object module of the called sub routine B also needs to be part of the
executable A. PGM A executable should be self sufficient in itself, meaning
it should have all the other called sub routines object modules clubbed with the
object module of the main pgm A ..such that the executable can run.
Lets assume the call is DYNAMIC for the same scenario as above,
When the main program A calls the subroutine B the object module of the
B will be loaded dynamically by the linker when PGM A is in execution
and a call is made to B.
Meaning the executable A is not fully self sufficient in itself for execution of the
application, it is depended on the LINKER to connect to other DLL's or object modules of called pgms.
NOTE ; Now which is the better way STATIC OR DYNAMIC ??
Preferably in COBOL it is a good idea to use DYNAMIC calls instead of STATIC calls.
The reason is when you use DYNAMIC calls and say there are some changes to the
sub-routine B ( same scenario as above) it is enough if we re-compile just the
sub-routine B, and we do not need to recompile program A or any other programs which
calls sub-routine B.
If it is a STATIC call then we need to have the entire listing of PGMS
which calls the sub-routine B and re-compile all the pgms.
But if you speak in terms of the Application Programming in other languages again its different
Things which needs to be given a thought
1) Assume you are developing a S/W for some feature in other language say VB OR JAVA
the product is shipped in the market in the form of an EXE(executable file).
Now lets think which is better an STATIC / DYNAMIC call with in the application ???
IF it is a static call u can ship ur product as one EXE
If it is a dynamic all u need to ship ur product as set of DLL's. ( for each called sub-routine)
There will be cost implications and user friendly issues ......
We can go on ...on the current TOPIC STATIC VS DYNAMIC , but the GOLDEN RULE is the decision can be
made considering the bigger picture in mind and the exact scenario we are dealing with.
As Info :
TO have more understanding you can goggle it , you can find N no of useful links with N examples.
Though it is a few years old, this is link to an article by Jim Moore which, technically is up-to-date and discusses a few other aspects of the dynam vs static arguement. _________________ Dick Brenholtz
JCL, SQL and code in programs have an irritating habit of doing what you say,
not what you meant.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum