Setting Compiler directives within a build configuration

All directives specified within the current build configuration are used when a project builds. Native COBOL projects may have more than one build configuration; you can set directives within any of the build configurations, but only ones set in the current one are used at build time.

  1. Select the required project, and then on the Project menu, select Properties.
  2. Select Micro Focus > 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.

  4. In the left-hand pane, select one or more of the appropriate options:
    For non-preprocessor directives:
    1. Click COBOL.
    2. Click Enable configuration specific settings.
    3. Select the menu option, as appropriate; most will equate to a Compiler directive.
    4. For any additional directives that need setting, in the Additional directives value cell, click Ellipsis button and use the Additional directives dialog box to specify the directives. Separate each directive with a space. .
    For SQL preprocessor directives:
    This option enables you to configure an SQL preprocessor and its directives.
    1. Click COBOL > SQL Preprocessor.
    2. Click Enable configuration specific settings.
    3. If not already enabled at the project settings level, check Use SQL Preprocessor, and then from the Preprocessor Type drop-down list, choose the appropriate preprocessor.
    4. On the Directives grid, complete the Value field for each directive you want to set, and then click Apply.

      The SQL Compiler directives you have selected appear in the SQL Directives text box.

    For other preprocessor directives
    This option enables you to configure other, non-SQL preprocessors and their directives.
    1. Click COBOL > Additional Preprocessors.
    2. Click Enable configuration specific settings.

      Any preprocessors already enabled at the project settings level are displayed.

    3. Use the options to install and configure existing or new preprocessors, including setting the directives (Edit), and setting the order in which the preprocessors are stacked (Up/Down).
    4. Click Apply
  5. Click Apply and Close.
Remember: These settings are only used during a build if the build configuration is the active one.