Rational Developer for System z
Enterprise COBOL for z/OS, Version 4.1, Programming Guide


Compiling OO applications under UNIX

When you compile OO applications in a z/OS UNIX shell, use the cob2 command to compile COBOL client programs and class definitions, and the javac command to compile Java class definitions to produce bytecode (suffix .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 these compiler options: RENT, DLL, THREAD, and DBCS. (The RENT and DBCS options are defaults.)

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 (typically /usr/lpp/cobol/include) in the search order for copybooks. You can specify the include subdirectory by using the -I option of the cob2 command or by setting the SYSLIB environment variable.

related references   
cob2 syntax and options  
DBCS  
DLL  
RENT
  
THREAD


Terms of use | Feedback

This information center is powered by Eclipse technology. (http://www.eclipse.org)