Creates a system executable file from the files input to the cob command. The input file can be any file type except a .gnt file. By default, the name of this module is the base-name of the first object being linked. It has no extension.
You also can use this option to produce a full COBOL run-time system, for example,
cob -xo rts.new
The CC option to the -x flag enables you to link COBOL and C++ objects into an executable file. If C++ (.C) source files are specified, the C++ compiler is invoked to compile them to object code first.
For example, if you want to link the C++ program cprg.C and the COBOL program cobprg.cbl, use the following commands:
cob -x,CC cobprg.cbl cprg.C
The PLI option to the -x flag enables you to include PL/I run-time system support for the executable produced:
cob -x,PLI pliprog.o
The PIE option to the -x flag enables you to create a position independent executable (PIE). (This flag is not supported when the operating system does not support position independent executables.)
cob -x,PIE cobprog.cbl cprog.c
To run a resulting system executable file, use the following:
./<basename-of-executable>
For example:
./cobprg