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 directives scan feature which automatically determines and sets 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.

In some cases, for certain project types and for multiple files, it might be useful to perform a directives scan – that is to trigger an automatic scan of all COBOL files in the project or solution to determine and set certain Compiler directives. By default, the IDE performs a directives scan of all COBOL files you add to your projects.

Project Properties

You can set project-level properties that can be specific to native and managed COBOL applications. You can set general properties that apply to all types of build as well as properties that apply to specific build configurations of the project, such as a debug or a release build.

Among the properties you can select are CICS, IMS, BMS, SQL and different debug options.

You can set different properties for the individual files included in your project. In this case the file properties override the ones set on project level.

Performing a Directives Scan and Setting Compiler Directives on Files

Restriction: It is possible to scan and determine the directives only for COBOL files that are part of native COBOL or Mainframe Subsystem Applications projects (native or managed). It is not possible to set Compiler directives on individual COBOL files for managed non-Mainframe Subsystem COBOL projects.
Performing a directives scan automatically
By default, the IDE is configured to automatically scan any new COBOL source files you add to the project. The scan assesses the code, determines what Compiler directives are required, and then automatically sets those directives on the files.

The IDE identifies and sets the COBOL dialect of the files or default CICS and SQL directives for the files that include EXEC CICS or EXEC SQL statements as specified in Tools > Options > Projects > COBOL Project Settings.

Triggering a directives scan manually
You can also trigger a directives scan of the COBOL files in your projects from Solution Explorer – right-click your project and select Reset source directives.

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 options for a directives scan are project independent.

Viewing the results of a directives scan
Each time the IDE performs a directives scan, it displays the results in the Output window.

In cases when the scan sets or unsets a directive value, 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 a directives scan completes and sets directives on the files, you can further modify the file properties.

File Properties

By default, the files that are included in your project inherit properties from the project level. You can modify the properties of individual files manually or trigger a directives scan to determine and set Compiler directives automatically. The file properties take precedence over the ones set on project level.

Depending on the file type, you can specify properties such as the COBOL dialect, CICS and SQL options, IMS specific options or any additional directives.

Previous Topic Next topic Print topic