Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

From compilation unit to executable program

Three steps are needed to convert a COBOL compilation unit into an executable program:

  1. Reading in the compilation unit (see section "Preparing the compilation unit")

  2. Compilation: The compilation unit must be converted into machine language. The compiler generates an object module or a link-and-load module (LLM) and logs the sequence and results of the compilation in listings.

  3. Linkage: One or more modules are linked with so-called runtime modules to create an executable program (see chapter "Linking, loading, starting").

Figure 1: Producing an executable program

Three functions are performed by the compiler during the compilation run:

  • Checking of the compilation unit for syntax and semantic errors,

  • Conversion of COBOL code into machine language,

  • Output of messages, listings, and modules.

The user can make use of control statements to

  • select COBOL2000 functions,

  • allocate resources for input and output,

  • define characteristics of the modules,

  • specify the type and scope of listing output.

The control options provided by COBOL2000 and by the operating system are described in detail in the chapter "Controlling the compiler via SDF" and the chapter "Controlling the compiler with COMOPT statements".

A compilation unit is a COBOL source program that can be compiled in one compilation run. However, it is also possible to compile a series of compilation units, a so-called compilation group, in a single compilation run.

 

The information relating to compilation units presented in the following sections also applies to compilation groups unless stated otherwise.

Possible input sources and output locations for the compiler: