You can configure the IDE to automatically determine and set Compiler directives on the COBOL files you add to your projects. You can also perform this operation manually using the
Determine Directives context menu command in Solution Explorer. The IDE examines the files and then determines and sets the appropriate directives on the files if those directives are not already set at the project level.
Restriction: This functionality does not work for projects that compile to a single output file.
You can configure how the IDE determines and sets Compiler directives from
Tools >
Options >
Micro Focus > Directives > COBOL.
The following options are available:
- Show selection dialog after determination
- Determine directives on files - ensure this is enabled in order for the Compiler directives found through a directives scan to be applied.
Tip:
- If
Determine directives on files is enabled but no other options are checked on this page, a directives scan does not set any directives on files.
- Click
Toggle Determine Directives,
, in the COBOL toolbar to quickly disable or enable
Determine directives on files.
The following directives are available:
- COBOL DIALECT directive
When the IDE performs a directive determination, it finds all possible dialects for the COBOL program and sets the dialect directive on the file if the dialect setting on project level is not one of them. The most likely dialect is chosen and the respective directive is set on the file.
- COBOL SQL directives
The IDE determines and sets SQL directives at file level if the files contain EXEC SQL statements and if the directive is not set at the project level.
Note: You must choose the SQL directives that you want to set if they occur in the file. To do this you click the browse button and select the directives you want.
You can also choose to unset SQL directives for this file. The IDE sets NOSQL on the files that do not include EXEC SQL statements and SQL is set at the project level. The directives are then not applied at compile time, regardless of any SQL directives set on the project.