Building a mixed COBOL-Java application that starts with COBOL
An application that runs in a Java™ dependent region must start with the main
method
of a class.
About this task
A COBOL class definition that has a main
factory
method meets this requirement; therefore, you can use a main
factory
method as the first routine of a mixed COBOL and Java application under IMS.
Enterprise COBOL generates a Java class with a main
method,
which the Java dependent region
can find, instantiate, and invoke. Although
you can code the entire application in COBOL, you would probably build
this type of application to call a Java routine.
When the COBOL run time runs within the JVM
of a Java dependent region,
it automatically finds and uses this JVM to invoke methods on Java classes.
The COBOL application should use DL/I
calls for processing messages (GU
and GN
)
and synchronizing transactions (CHKP
).
Structuring OO applications
IMS Application Programming Guide
IBM® SDK for Java - Tools Documentation