cobc: the COBOL compiler
| Compile modes | |
| Useful flags | |
| Run and trace |
Compile modes
cobc compiles a .cob or .cbl file. The -x flag produces a runnable executable instead of a module, and -o names the output file:
cobc -x -o hello hello.cob
Useful flags
Two flags make learning easier. -free switches from fixed-format columns to free-format source, and -Wall asks for more warnings:
cobc -x -free -Wall -o hello hello.cob
Run and trace
The compiler can also run your program directly with -run, which is handy while you experiment:
cobc -x -free -run hello.cob
Next: Your first COBOL program
Article author: Arthur Isaev