Compiler Command-Line Examples

Here are some examples of common commands. The following command will simply compile the program test.cbl and produce the object file test.acu. The program will be compiled in VAX COBOL compatibility mode.

ccbl  test.cbl

This next command will compile the same program in RM/COBOL compatibility mode. It will treat signs in a manner consistent with early versions of RM/COBOL and suppress reserved words not used by that compiler. These options are particularly common when you are converting programs written for RM/COBOL.

ccbl  -Cr -Ds  -Rva8  test.cbl

The following Windows console-mode (DOS-box) command will compile the program TEST.CBL and produce an object code file named TEST in the c:\objects directory, and create a full listing called TEST.LST in the current directory.

ccbl32  -o  c:\objects\@  -Lfo  @.lst  test.cbl

Finally, this command will perform the same function on a UNIX machine except that the listing will be sent to the print spooler lp.

ccbl  -o  /objects/@  -Lf  test.cbl  |  lp