Develop COBOL container batch applications
Use the COBOL container within the product to invoke COBOL modules from a Java-based batch application.
Read the COBOL container overview topic for more detailed information.
The COBOL container provides a means of direct integration of COBOL into Java batch processing.
- Create a COBOL call stub Java class
To call a COBOL module from a Java batch plain old Java object (POJO) in the batch environment, first create a COBOL call stub Java class.
- Compile a COBOL call stub Java class
We can compile COBOL call stubs with the marshal.jar and ilcontainer.jar files on the classpath. The marshal.jar and ilcontainer.jar files are included with the COBOL call stub generator tool.
- Invoke a COBOL call stub Java class.
Invoke the Java call stub from the batch application. Read the COBOL call stub Java class usage example topic for more information.
- Optional: Dynamically update a COBOL module
We can dynamically update a COBOL module without having to restart the application server.
Subtopics
- Create a COBOL call stub Java class
To call a COBOL module from a Java batch plain old Java object (POJO) in the batch environment, first create a COBOL call stub Java class.
- Compiling COBOL call stub Java classes
COBOL call stub Java classes must be compiled with the marshal.jar and ilcontainer.jar files on the class path. The marshal.jar and ilcontainer.jar files are included with the COBOL call stub generator tool.
- Dynamically updating a COBOL module
We can dynamically update a COBOL module without having to restart the batch application server.
- COBOL call stub Java class usage example
The COBOL call stub Java class usage example shows how a batch application can invoke a COBOL procedure using the COBOL container.
- COBOL RETURNING, RETURN-CODE, getReturnValue, and getReturnCode parameters
If the COBOL module specifies a RETURNING parameter, it can be retrieved from the stub using the stub.getReturnValue() method. The method returns the Java object representation of the RETURNING parameter, which is the data bindings class generated by the COBOL call stub generator tool.
- COBOL container for batch troubleshooting
If we encounter problems when using COBOL container for batch troubleshooting, there are a number of options that are available to you.
Related concepts
COBOL container overview
Related tasks
Generating COBOL call stubs