Previous Topic Next topic Print topic


Overview of COBOL Project Properties

You can specify default properties that apply to the COBOL projects in all or selected build configurations, and to individual files in the projects. You can also configure the IDE to automatically determine and set Compiler directives on the COBOL source files in the IDE.

After you have created a solution with one or more projects to hold your source code, you can set various project and file properties to control the way your applications build and execute.

For example, you can first set the project properties that apply to all files in the project in all or selected build configurations. Then you can modify the properties of the individual files in the projects if that’s necessary. If you change the file properties, they take precedence over the directives on project level.

Project Properties

You can set properties at the project level that apply to the entire project. Any build-specific configuration properties, such as for Debug or Release configurations, override the project properties.

For projects that compile to multiple output files, you can also set properties at file level and these override the build configuration properties and the ones set on project level.

Determining and Setting Compiler Directives on Files

Restriction: This functionality does not work for projects that compile to a single output file.

In some cases, for certain project types and for multiple files, it might be useful to automatically scan the project and set the required Compiler directives on files. You can do this with the Determine Directives context menu command available on project and file level in Solution Explorer and in the Project Details window.

By default, the IDE shows a Directive Determination Result dialog box that enables you to preview the suggested Compiler directives before applying them on the file.

The directives identified through a directives scan are only set on individual COBOL files and override the directives set on project level. However, if the directive is already set on the project, it is not set on the file.

The IDE identifies and sets the COBOL dialect of the files or default SQL directives for the files that include EXEC SQL statements as specified in Tools > Options > Micro Focus > Directives > COBOL.

Determining and setting directives automatically
By default, the IDE is configured to automatically assess the contents of any COBOL source files you add to the project and then determine and set Compiler directives on them as required.
Determining directives manually
To perform a directive determination and setting manually, use the following command available from Solution Explorer – right-click your project or a selection of files in the project, and click Determine Directives.
Viewing the results of setting directives
The IDE displays information about the directives it sets on files in the Output window. A description of the action, and the directive value set is shown. For example:
Scanning file C:\Users\Public\Documents\MyProject\ConfigReader.cbl
Setting SQL off
Setting Dialect MF
Scanning file C:\Users\Public\Documents\MyProject\Minesweeper.cbl
Setting SQL off
Setting Dialect MF
Scan complete.

After you determine and set the Compiler directives on the files, you can further modify the file properties.

File Properties

By default, the files that are included in your project inherit the properties set at the project level. You can modify the properties of individual files manually or perform a directive determination to set these automatically. The file properties take precedence over the ones set on project level.

You can specify properties such as the COBOL dialect and SQL options or any additional directives.

Note: The controls displayed on the properties page are determined by the type of project you are working on. As a result, some of the controls described in this section might be missing from your properties page or be unavailable for selection.
Previous Topic Next topic Print topic