When you compile OO applications, use the cob2 command to compile COBOL client programs and class definitions, and the javac command to compile Java class definitions to produce bytecode (extension .class).
To compile COBOL source code that contains OO syntax such as INVOKE statements or class definitions, or that uses Java services, you must use the THREAD compiler option.
A COBOL source file that contains a class definition must not contain any other class or program definitions.
When you compile a COBOL class definition, two output files are generated:
If a COBOL client program or class definition includes the file JNI.cpy by using a COPY statement, specify the include subdirectory of the COBOL install directory in the search order for copybooks. (The location of the COBOL install directory is specified in the Windows environment variable RDZvrINSTDIR, where v is the version number and r is the release number of Rational Developer for System z.) You can specify the include subdirectory by using the -I option of the cob2 command or by setting the SYSLIB environment variable.
related tasks
Setting environment variables
Compiling programs
Preparing OO applications
Running OO applications
Accessing JNI services
related references
Compiler environment variables
cob2 options
THREAD