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


Wrapping procedure-oriented COBOL programs

A wrapper is a class that provides an interface between object-oriented code and procedure-oriented code. Factory methods provide a convenient means for writing wrappers for existing procedural COBOL code to make it accessible from Java programs.

To wrap COBOL code, do these steps:

  1. Create a simple COBOL class that contains a FACTORY paragraph.
  2. In the FACTORY paragraph, code a factory method that uses a CALL statement to call the procedural program.

A Java program can invoke the factory method by using a static method invocation expression, thus invoking the COBOL procedural program.


Terms of use | Feedback

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