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


Image description: compiling and linking a class definition

This image shows a COBOL class definition and the z/OS UNIX shell commands that you use to compile and link the class. This text conveys all the information contained in the image.

The following is the COBOL class definition:

Identification division.
Class-id Manager inherits Employee.
Environment division.
Configuration section.
Repository.
      Class Manager is "Manager"
      . . .

End class Manager.

The following are the steps for compiling and linking this class definition:

  1. Use the following command to compile the COBOL class definition Manager.cbl:
    cob2 -c -qdll,thread Manager.cbl

    This command produces the Java class definition Manager.java and the object file Manager.o.

  2. Use the following command to compile the Java class definition Manager.java:
    javac Manager.java

    This command produces the executable component Manager.class.

  3. Use the following command to link the object file Manager.o and the two DLL side files:
    cob2 -bdll -o libManager.so Manager.o
    /usr/lpp/java/IBM/J1.3/bin/classic/libjvm.x
    /usr/lpp/cobol/lib/igzcjava.x

    This command produces the executable DLL module libManager.so.

End of image description.


Terms of use | Feedback

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