You can integrate EGL-generated code with existing software.
EGL-generated COBOL code can interact with native (non-generated)
programs on the same platform, whether the platform is CICS®, IBM® i, IMS™, or z/OS® batch. EGL-generated Java™ code can call local, native programs that
are written in C, C++, or Java and
can call remote CICS, IBM i, or IMS programs.
You can integrate EGL-generated code and native Java code in two ways:
- Use EGL to access a native Java interface
or class from within your EGL code. You can use EGL syntax to work
with the Java-based logic.
- Cause a native Java class
to call an EGL-generated program. This kind of integration involves
a Java wrapper and a set of Java classes that are deployed with
the native class. The Java wrapper
acts as an intermediary between the externally created code and the
EGL-generated program.
The EGL technology hides the details of data conversion; for a
visual explanation, see the previous figure. The native code invokes
the Java wrapper, submitting
data to be transferred to the program. The wrapper then calls the
program, which might be on a remote platform. The wrapper accepts
the data that is returned from the program and relays the data back
to the native code.
The Java wrapper is specific
to the EGL-generated program that is called, and the wrapper and program
can be generated at the same time.