The default options used by the cob2 command are obtained from the configuration file, which is by default /etc/cob2.cfg. You can display the options used by cob2 (or cob2_j, or cob2_r) by specifying the -# option on the command.
If you are using the default configuration file, the command cob2 -# abc.cbl displays output that looks like this:
exec: /usr/lpp/cobol/bin/IGYCCOB2 abc.cbl exec: /usr/bin/ld -bpT:0x10000000 -bpD:0x20000000 -bhalt:5 /lib/crt0.o abc.o -lcob2_r -L/usr/lpp/cobol/lib -lC128 -lc128 -lc
If you edit or display /etc/cob2.cfg (using the cat command), a line is displayed that specifies the COBOL compiler to use:
DEFLT: compiler1 = /usr/lpp/cobol/bin/IGYCCOB2
Other lines in the file specify the linker and various options.
You can modify the cob2.cfg configuration file, for example to change the default options or the location of the compiler and libraries. For example, the cob2_j stanza of cob2.cfg specifies the Java library-names. You might need to update the Java library-names to indicate the release level of Java that you are using.
Instead of modifying the default configuration file, you can tailor a copy of the file for your purposes.
related concepts
JDK support
related tasks
Tailoring your compilation
related references
cob2, cob2_j, and cob2_r options
Stanzas in the configuration file