Using a build plan after generation
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.
- 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.
build.bat myProgramBuildPlan.xmlwhere 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
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- The template is for a command file on a Windows™ platform and is similar to what is required for Linux™.
- The statement that begins with
set classpathmust be on a single line. - InstallDirectory is the fully qualified path for the directory where you installed the EGL developer product.
- SharedInstallDirectory is the fully qualified path for
the directory where you installed the shared resources for the EGL
developer product. For example, the path might be
C:\Program Files\IBM\SDP70Sharedon a Windows™ system or/opt/IBM/SDP70Sharedon a Linux™ system.If you installed and kept a previous version of the EGL developer product before installing the product that you are using now, the shared installation directory of interest may be the directory that was used in the earlier install.
- version is the plugin version. The value has three numbers
separated by periods, followed by a string separator, followed by
the date and time that the plugin was built. An example is
7.0.0.RFB_20070120_1300. If more than one version of the same plugin is present, use the most recent version number, unless you have a reason to use an older version. The version number typically is different for the different resources referenced in the command file. - %1 is the only input parameter for the command file. When invoking the command file, specify the EGL-generated build plan, including the file extension .xml.
Starting the CCU Security Manager
- 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 -VIn this case, destHost, destPort, destUserID and destPassword have the same meaning as described for the corresponding build descriptor options.
The
ccubldccommand 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.CCUconfigThe Distributed Build Security Configuration dialog is displayed.
- Click the Client Items tab and specify the host, userID, and password.