For native COBOL projects, you can use a directives scan to ensure dialect-related properties for individual COBOL source
files are correct. When you add a COBOL file to the project, a scan can run automatically to determine the required directives,
and if they are not already set at the project level, can be applied at the file level. You can also run this process manually,
at any time. For more information, see
Setting file properties using directive scanning.
You can configure the behavior when invoking a directives scan from
page.
- Perform automatic directives determination
- Determine the behavior when a COBOL file is added to your project: set the process to
Always (the process runs automatically when a file is added),
Never (the process does not run), or
Prompt (a prompt is displayed to allow you to decide whether to run the process).
- Dialect
-
- Set the dialect directive on files
- If selected, a scan determines all possible dialects for the COBOL program, and the 'dialect' Compiler directive of the most
likely dialect is set at the file level if it is not already set at the project level.
- SQL
-
- Set SQL directives on files containing EXEC SQL
- If selected, a scan determines and sets SQL directives at file level if the files contain EXEC SQL statements and the directive
is not already set at the project level.
- Unset SQL directives on files that do not contain EXEC SQL
- If selected, a scan sets the NOSQL directive on files that do not include EXEC SQL statements but 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.
- CICS
-
- Set SQL directives on files containing EXEC CICS
- If selected, a scan determines if the CICSECM directive with potentially additional options (such as "Abend at run time")
is required. If required, and differs from the directive set at the project level, the required directive (and additional
options) is set on the file.
- Unset SQL directives on files that do not contain EXEC CICS
- If selected, a scan set the NOCICS directive on files that do not contain EXEC CICS statements but CICSECM is set at the project
level. The directives are then not applied at compile time, regardless of any CICS directives set on the project.
- Source encoding directive
-
- Set encoding value on new COBOL projects
- Select the encoding for source files of any new COBOL project. This sets the SOURCE-ENCODING directive at the project level
for each project. For Japanese locales/language, this defaults to
UTF8; otherwise, the default is blank.
- Once set, this can be overridden after the project has been created, at either the project, build configuration, folder, or
file level (with each level in this list overriding its predecessor).[1]
Note: A byte order mark (BOM) within the source program will override the encoding settings at any of the levels above.