This topic tells how to defer use of a build plan that
you create. The need arises (for example) if, at generation time,
a network failure prevents you from preparing code on a remote system.
If you want to defer use of a build plan even in the absence of an
unexpected need, generate your output with the build descriptor option prep set
to no.
To defer use of a build plan, do the following steps, as described
in later sections:
- Create a command file (in our example, build.bat) to run the build
plan. You do not need to hardcode the build-plan name in build.bat;
instead, specify an input parameter to accept the name.
- Start the CCU Security Manager and supply it with a password before
running the build plan. You can run the build plan multiple times
thereafter; you do not need to start the CCU Security Manager each
time.
Note: For security reasons, the EGL-generated build plan does
not contain the password that was specified at generation time in
the build descriptor option destPassword.
At preparation time, the CCU Security Manager keeps a set of passwords
securely in memory.
For convenience, place build.bat in a directory that is referenced
by the operating-system PATH variable. You can then invoke the file
as follows:
build.bat myProgramBuildPlan.xml
where
myProgramBuildPlan is
the build-plan name.
For details on preparing multiple COBOL programs at once, see “EGLPREP
batch command utility.”
Creating the command file that runs the build plan
Here
is a template for build.bat, with italicized words indicating the
site-specific values:
set INSTALL_PATH=InstallDirectory
set SHARED_INSTALL_PATH=SharedInstallDirectory
set JDK_PATH=jdk\jre\bin
set PLUGIN_PATH=plugins
set EGLBatchGen_JAR=com.ibm.etools.egl.batchgeneration_version\runtime\eglbatchgen.jar
set LOGGING_JAR=com.ibm.etools.logging.util_version\runtime\logutil.jar
set CCUBLDC_DIR=com.ibm.etools.egl.distributedbuild_version\executables\Win
set path=%INSTALL_PATH%\%JDK_PATH%;%SHARED_INSTALL_PATH%\%PLUGIN_PATH%\%CCUBLDC_DIR%
set classpath=%SHARED_INSTALL_PATH%\%PLUGIN_PATH%\%EGLBatchGen_JAR%;
%SHARED_INSTALL_PATH%\%PLUGIN_PATH%\%LOGGING_JAR%
cd %INSTALL_PATH%\%JDK_PATH%
java com.ibm.etools.egl.distributedbuild.BuildPlanLauncher %1
Here
are details about the content:
Starting the CCU Security Manager
To start
the CCU Security Manager, do any of the following steps:
- From the workbench, run any COBOL generation with the build descriptor
option prep set to yes, and ensure
that the build descriptor options destHost and destUserID are
set to the host and userID values that are specified in the build
plan. In this case, the Security Manager receives the value of build
descriptor option destPassword.
- Alternatively, ensure that the PATH and CLASSPATH variables are
set as described in the previous section (in relation to build.bat)
and then run the following command at the command line:
ccubldc -h destHost@destPort -b x -au destUserId -ap destPassword -V
In this case, destHost, destPort, destUserID and destPassword have
the same meaning as described for the corresponding build descriptor
options.
The ccubldc command causes a build
failure message because of the attempt to run a nonexistent script
named x. However, the command has the side effect of starting the
CCU Security Manager with the password that you specify in the command.
- A third way to start the CCU Security Manager is to ensure that
the PATH and CLASSPATH variables are set as described in the previous
section (in relation to build.bat) and then run the following command
at the command line:
java com.ibm.etools.egl.distributedbuild.security.CCUconfig
The Distributed
Build Security Configuration dialog is displayed.
- Click the Client Items tab and specify
the host, userID, and password.