Linking

When link-editing ILC application load modules, there are different considerations for the main load module (the load module that contains the main routine) and for a load module that is fetched or dynamically called.

For the main load module, you should present your main routine to the linkage editor first in order to avoid an incorrectly chosen entry point. See Determining the main routine for information about how to identify the main routine.

For load modules that will be fetched or dynamically called, the entry point of the load module must be as follows:
  • When C is the called routine and it does not specify any #pragma linkage, then the routine name must be the entry point.
  • When C is the called routine and it specifies #pragma linkage(...,COBOL), then the routine name must be the entry point.
  • When C is the called routine and it specifies #pragma linkage(,fetchable), then CEESTART or the routine name must be the entry point.
  • When COBOL is the called routine, the program name must be the entry point.

To specify the entry point of a load module, use the binder's ENTRY control statement.