cobol Command Examples

The following examples illustrate how you could compile a program, myprog, using a number of options from the command line.

To create myprog.obj but first receive prompts for the listing files, enter:

cobol myprog,,

To create myprog.obj but no listing files, terminate the command line with a semicolon instead of a comma:

cobol myprog; 

To create myprog.obj and an object code listing in myprog.grp, enter:

cobol myprog,,nul,,

To create the object file myprog.obj in the myobjdir directory, enter:

cobol myprog,\myobjdir\;