Setting project-wide Compiler directives

All directives specified at a project level are used when a project compiles, apart from those overridden by settings for individual files, folders or build configurations.

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

The Compiler directives are saved with the project, so that they are used on all files in the project the next time you build the project.

Directives set here can be overridden by directives specified in build configurations, folder properties, or for individual source files.