To invoke the Cob utility, enter the following from a UNIX system command prompt:
cob-command [options|filename] ...
Where:
Your effective working mode is determined by the COBMODE environment variable, global settings or, if none of these is set, the default (64-bit). To show the effective working mode, enter cobmode at the command line without any arguments.
The cob command assumes that any unrecognized options are either input files or valid linker options to be saved and used at link time. In this way, any archive files you supply to the cob command are passed to the linker, which pulls out only the referenced files from the archive.
cob -xve "" -o my_rts -C xopen prog.cbl prog2.c
The above command passes the XOPEN directive to the Compiler and instructs cob to compile the COBOL source file prog.cbl and the C source file prog2.c and to link the result into a system executable file named my_rts that, when run, expects the name of the program to run to be given on its own command line. The cob utility also gives verbose notification of its progress.
The above command assumes that neither the file $COBDIR/etc/cobopt nor the COBOPT environment variable exist.