ContentsIndexPreviousNext

2.1 Using the Compiler

ACUCOBOL-GT is a single-pass ANSI X3.23-1985 COBOL compiler (ccbl). Errors encountered are displayed on the screen (or written to an error file if one is requested) referencing the line where the error was detected by source file and line number. A source listing, a symbol table listing, and general information can be created on request.

A successful compile produces an object-code file. This file is ready to be run by the ACUCOBOL-GT runtime system, runcbl. No linking is needed to run the program. Any programs that are called during execution are loaded dynamically at runtime by runcbl. Subprograms written in C may be linked into the runtime system directly, and then called by a COBOL program using the CALL verb.


Note: The compiler, the runtime, and some utility programs have different names, depending on the host system. For simplicity in this manual, we refer to the compiler as ccbl, the runtime as runcbl, and the utilities by their base names (vutil, vio, logutil, and cblutil).

runcbl has a symbolic source-level debugger built into it. You can run any program under the debugger by specifying it at runtime. The debugger runs in its own window that overlays the running program. This prevents the debugger's output from interfering with the program's output.

The compiler is called ccbl. It can be run in one of three different modes. These modes are:

Compile Compiles COBOL programs

Help Prints a command line summary

Version Prints the version and copyright

The compile mode is the default mode. The other modes are activated by command line options. The compile mode is discussed here; other modes are described in separate sections in this chapter.

To compile a program, enter the following:

ccbl [options] program

No options are required. When no options are specified, the compiler prints an error listing on the user's terminal and names the object file "source-name.acu". The compiler runs in VAX COBOL compatibility mode by default. Other than the error listing, no other listings are produced.

Many options are available. These are all indicated by an initial hyphen (minus sign). These options are divided into different groups. Each group (except the first) has a distinguishing letter. For example, the options that control listings all start with the letter "L". Any set of options from the same group may be specified together. For example, the "-Lo" option and the "-Ls" option may be grouped together as "-Los". See below for examples. Command line options that begin with a hyphen are not case sensitive. For example, "-Lo" and "-lo" are equivalent.

Options from the same group that require arguments may also be specified together, as long as the required arguments immediately follow the combined options, in the same order as the options. For example,

-o  file1  -e  file2

may also be specified as

-oe  file1  file2

The complete list of options is given in the following sections.

More:

2.1.1 Standard Options

2.1.2 Listing Options

2.1.3 Compatibility Options

2.1.4 File Options

2.1.5 Source Options

2.1.6 Reserved Word Options

2.1.7 Data Storage Options

2.1.8 Video Options

2.1.9 Debugging Options

2.1.10 Mapping Options

2.1.11 Miscellaneous Options

2.1.12 Upper and Lower Case

2.1.13 File Name Handling

2.1.14 Examples

2.1.15 CBLFLAGS Environment Variable

2.1.16 Help, Version Information, and Communication With C Programs