Preparation is the process by which EGL technology configures
the generated output for subsequent deployment on a target platform.
However, the preferred process for configuring output for Rich UI
applications and services is called EGL deployment, which
occurs in the Workbench. For an overview of deployment, see “Introduction
to EGL generation and deployment.”
After generating Java™ or
COBOL code, EGL technology helps you prepare the generated output
for use on the target platform. The output of preparation is as follows:
- For Java, a collection of
class files
- For COBOL, an executable module
The preparation phase is controlled by the build plan that EGL
created during generation. The preparation phase can include steps
to do some or all of the following actions:
- Use TCP/IP to transfer the generation output to your build server.
- Run the build scripts on the build server, in order to compile
and link the generation output. Depending on the target runtime environment
and your database type, the build scripts might also include steps
for a CICS® translation or steps
for a DB2® precompile and bind.
- Transfer the results of the preparation phase back to the generating
workstation or workspace.
The build plan controls the order of output as it is sent to the
build server. The build plan also controls which build scripts are
run on the build server. Usually, EGL starts the build plan automatically.
However, if you have set the prep build
descriptor option to NO, EGL will create the build plan but not start
it. You can start that build plan at a later time. You can find more
information in the topic "Using a build plan after generation".
For COBOL generation, all three of the above preparation actions
are always used. The output of the production phase must be placed
outside the workspace using the
genDirectory build
descriptor option. In the preparation phase EGL transfers the generation
output to the host system; then uses the build server to compile and
link the output; finally, it transfers the results of the process
back to the workstation that was used to generate the output. The
preparation phase for COBOL has the following requirements:
- The build server must be running in your target runtime environment
at generation time.
- The system administrator must customize the build scripts so that
they are appropriate for your site.
- You can find information about modifying z/OS® build scripts in the topic "Modifying EGL
build scripts for z/OS" and
the IBM® Rational® COBOL
Runtime Guide for zSeries.
This guide also has information on starting and customizing the build
server.
- If you are generating to an iSeries® environment, you can find information
about customizing build scripts in the IBM Rational Business Developer
EGL Server Guide for IBM i.
This guide also has information about starting the build server.
For Java generation, the
preparation phase can occur in several different ways depending on
where you place the output of generation. You specify which method
to use by setting certain build descriptor options as follows:
- Generate within your workspace, and place the output of the production
phase into an existing project, using the genProject build
descriptor option. In this scenario, EGL does not create the build
plan, and the build server and transfer steps are not used. If you
have the workbench preference Build Automatically turned
on, the preparation step (compiling the Java code
and any other output of generation) occurs automatically; if that
preference is not turned on, you can build the project at a later
time.
- Place the output of generation into a directory on the same workstation,
but outside the workspace. This is done by setting the genDirectory option,
but not setting the destHost option. In
this scenario, EGL creates a build plan which in turn starts the Java compiler on the local workstation;
however, EGL does not use the build server, and EGL does not use the
transfer step.
- Place the output of generation into a directory outside the workspace,
then transfer the output to a remote system for preparation. This
uses the destHost, destDirectory,
and related build descriptor options. In this scenario, EGL creates
a build plan to control the order of output that is sent to the remote
system. The build plan also controls the build scripts that are run
on the remote system.
You can prepare code outside of the Workbench, as noted in “EGLPREP
batch command utility.”
After the preparation phase, your program is ready to deploy for
the runtime environment as follows: