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.
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.
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.
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.
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.