Previous Topic Next topic Print topic


Overview of Linking Native COBOL Applications and Run-time Systems

Note: The following information applies to native code only.

When you link a program compiled as native code, you link it to any run-time support modules that it uses, and to the run-time system that it needs.

There are two COBOL run-time systems to choose from: the static-linked run-time system and the shared run-time system. There is a version of both these run-time systems for creating single-threaded and multi-threaded applications.

There are two ways to link to the shared run-time system: by importing the run-time system, or by binding to the run-time system dynamically.

The way you link depends on the type of application, as follows:

Application for personal use
such as a small application or utility. With this model, you create an application the run-time system and support files are built into in your application's executable file. This might be a standalone application comprising a single file.

To build this type of application, you link it statically as a standalone application.

Application for selling on to an end user
such as those written by Independent Software Vendors (ISVs). This type of application is likely to be the sole COBOL application that the user runs, and so it does not share the run-time system and support files with other applications. If there are other applications, they each use their own versions of the run-time files without disruption. With this model, you create an application that imports the run-time system and support files.

To build this type of application, you build a modular application, and link it with the run-time system. You do not enable dynamic binding so that the run-time files are imported into the application.

Application for corporate use
where multiple COBOL applications are running, and need to share the run-time system and support files both on disk and in memory. With this model, you create an application that is dynamically bound to the run-time system and support files.

To build this type of application, you build a modular application, and dynamically bind it to the run-time system. To do this, you link the top-level COBOL executable to the run-time system and enable dynamic binding.

Previous Topic Next topic Print topic