Rational Developer for System z
COBOL for Windows, Version 7.5, 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.

related tasks
Defining a class
Defining a factory section
Defining a factory method


Terms of use | Feedback

Copyright IBM Corporation 1996, 2008.
This information center is powered by Eclipse technology. (http://www.eclipse.org)