In many COBOL systems, subprograms and support modules must be linked to your programs by a linker utility after compilation. In Visual COBOL, linking is unnecessary, though it is available as an alternative method (see the section COBOL Link Option later in this chapter for an overview of linking).
Using Visual COBOL you can run callable shared objects, .int files, and .gnt files without linking them into a system executable file. This ability is provided by the COBOL dynamic loader (see the the section Dynamic Loading for more details). Dynamic loading is used to:
To make use of the dynamic loader, you must compile your program to a callable shared object, intermediate code file, or generated code file; these file formats are known as the callable file formats. For example, the command:
cob -z myprog.cbl
creates the callable shared object myprog.so, while the command:
cob -u myprog.cbl
creates myprog.gnt
Callable shared objects, .int files, and .gnt files do not have to be linked into a system executable file to be able to run. However, they do need to be called by a system executable that has been linked with the COBOL run-time system. Visual COBOL provides a default trigger program, cobrun (and for multi-threading applications, cobrun_t). The diagram below shows how an application could be packaged using the callable file formats and the cobrun trigger.
See the chapter Running for details on using cobrun and cobrun_t. See your Multi-threaded Programming book for details on multi-threaded programming.
You can create your own system executable file to trigger your application if required. See the chapter Linking to System Executables for details on creating system executable files.