COBOL and Java Programs

The Java™ Native Interface (JNI) allows Java code inside a Java Virtual Machine (JVM) to interoperate with applications and libraries that are written in other programming languages, such as COBOL, RPG, C, C++, and Assembler. This chapter describes how to make COBOL and Java programs work together, using the JNI.

You can also use the following components of the IBM® Toolbox for Java to combine COBOL and Java programs:
  • The ProgramCall class in the IBM Toolbox for Java uses the IBM i Host System Program Call driver to call IBM i program objects.
  • Program Call Markup Language (PCML) is a tag language based on the Extensible Markup Language (XML). You can generate tags that fully describe the input and output parameters for ILE COBOL programs that are called by your Java application by specifying the PGMINFO and INFOSTMF parameters on the COBOL command. The IBM Toolbox for Java includes an application programming interface (API) that interprets the PCML, calls the program, and simplifies the retrieval of data returned from the IBM i machine.

For more information about these approaches, refer to the Java section of the Programming category in the IBM i Information Center at this Web site -