Using CALLs

You should consider storage management tuning for all CALL intensive applications.

With static CALLs (call literal with NODYNAM), all programs are link-edited together, and hence, are always in storage, even if you do not call them. However, there is only one copy of the bootstrapping library routines link-edited with the application. With dynamic CALLs (call literal with DYNAM or call identifier), each subprogram is link-edited separately from the others. They are brought into storage only if they are needed. This is the better way of managing complicated applications. However, each subprogram has its own copy of the bootstrapping library routines link-edited with it, bringing multiple copies of these routines in storage as the application is executing.

Another aspect is program loading. Since a dynamic CALL subprogram is brought into storage when it is first needed, it is not loaded into storage at the beginning together with the caller program. There is an overhead in terms of program load processing. In general, it is beneficial to use dynamic calls when the call structure of an application is complicated, the size of the subprograms is not small, and not all subprograms are called in a particular run of the application.

Performance considerations for using CALLs between programs compiled with similar COBOL versions (measuring CALL overhead only):
  • Static CALL literal was on average 40% faster than dynamic CALL literal.
  • Static CALL literal was on average 52% faster than dynamic CALL identifier.
  • Dynamic CALL literal was on average 20% faster than dynamic CALL identifier.
Note:
  • For the purpose of this discussion, the following COBOL versions are considered similar:
    • COBOL V4.2 and prior releases
    • COBOL V5.1 and later releases
  • These measurements are only for the overhead of the CALL (i.e. the subprogram did only a GOBACK); thus, a full application that does more work in the subprograms may have different results.

Related tasks
Transferring control to another program (Enterprise COBOL for z/OS® Programming Guide)