Configuring Build Configuration Settings

Note: Settings within a build configuration will override any set in the Project Settings section.
  1. From an Eclipse workspace, select the required project, and then select Project > Properties.
  2. Expand Micro Focus, select Build Configurations.
  3. For native COBOL projects only, click the name of the active build configuration in the right-hand pane, and select the required configuration from the list displayed.

    The name of the configuration being edited is displayed at the top of the right-hand pane as you select the different sections. Managed COBOL projects only allow one build configuration, and so build configuration names are not required.

    (To create a new build configuration or change active configurations, refer to Managing Build Configurations.)

  4. Select each of the following sub-sections (to the Build Configurations option) to edit the settings of the current build configuration:
    Build Environment

    Use this section to specify any environment variables used in the build configuration; see To specify environment variables for an application for more information.

    COBOL

    Use this section to configure general COBOL behavior, additional Compiler directives, output file naming and location, and settings relating to debugging.

    1. Click COBOL.
    2. Select Enable configuration specific settings.
      Note: To remove all previously inherited settings, select Override settings from a higher level (instead of merging); only settings from this level down are applied.
    3. Select the values in the table, as required.
    4. To specify directives, in the Additional directives value cell, click The ellipsis button and type the directives to be used in the Additional directives dialog box. Separate each directive with a space.
    COBOL > Additional Preprocessors

    Use this section to configure the use of additional preprocessors, including the ones supplied with Visual COBOL (the CP, EHTML, and XML preprocessors); see the individual topics on each preprocessor for details of the directives you can set.

    1. Click COBOL > Additional Preprocessors.
    2. Select Enable configuration specific settings.
    3. Use the available options to add, edit, or remove preprocessors.
    COBOL > Code Analysis

    Use this section to enable a number of code analysis rules in the build configuration; see Code Analysis for more information.

    1. Click COBOL > Code Analysis.
    2. Select Enable configuration specific settings.
    3. Select Run active rule sets after build, then select the required rules.
    COBOL > Directive Set References

    Use this section to use one or more directive sets in the build configuration; see Configuring Directive Sets for more information.

    1. Click COBOL > Directive Set References.
    2. Select Enable configuration specific settings.
    3. Use the available options to add, remove, or set the order of directive sets.
    COBOL > SQL Preprocessor

    Use this section to configure the use of an SQL preprocessor (OpenESQL, Db2, or Oracle Pro*COBOL); see SQL Preprocessors for more information.

    1. Click COBOL > SQL Preprocessor.
    2. Select Enable configuration specific settings.
    3. Select Use SQL Preprocessor, then click and select the required preprocessor.
    4. Configure the directives, as required.
    Deploy
    Use this section to configure the build process to deploy certain files to a particular folder; see Preparing Files for Deployment for more information.
    Events
    Use this section to write command line entries to be run before and after the build takes place. Include directives as part of any command line instruction you enter in the Pre-build event command line and Post-build event command line text boxes.
    Note: When using environment variables in events, where they are set determines how you reference them within these events:
    • Variables defined in the environment, before Eclipse is started, and variables defined in the Build Environment properties pages: for local Windows projects, these are referenced enclosed in % signs, for example: %MY_ENV_VAR%; for UNIX projects (both local and remote), these are referenced with a prefixed $ sign, for example: $MY_ENV_VAR. The scope of a changed environment variable is limited to the build event in which it is made and lasts for the duration of that event.
    • Path variables: these are used by Eclipse to refer to paths used within the Eclipse workspace; some examples are ECLIPSE_HOME, PARENT_LOC, PROJECT_LOC, and WORKSPACE_LOC. Path variables are defined in the Resources > Linked Resources > Path Variables property page. To use them in a pre- or post-build event, you must prefix the variable name with ${pathVar. and terminate it with }; for example, ${pathVar.PROJECT_LOC}.
    Link
    Use this section to configure how the application links to the run-time system, including resource files and other items to be linked.
    1. Click Link.
    2. Select Enable configuration specific settings.
    3. Select the values in the table, as required.