The compiler is called ccbl. It can be run in one of three 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.
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.
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 options used to compile a COBOL program are automatically embedded in the header of the resulting object file. Use the -x option of the cblutil info command to output these options.
The Compiler also supports several compiler directives. Compiler directives are directly embedded in the source code and cause the compiler to behave as specified by the directive. Support for compiler directives is likely to expand in future versions. See Conditional Compilation Options for more information.