COBOL Properties

The properties you specify on the COBOL page in the project properties apply to the selected configuration.
Note:
  • You can set file properties that differ from the ones set for the project. In this case, the properties set on file level take precedence over those set for the project. To revert a file setting to the value set on the project level, set its value to <inherit from parent>.
  • 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 here might be missing from your properties page or be unavailable for selection.

General

Platform target
The target platform, such as x86, x64 or Any CPU. Any CPU is available for managed code projects only. Valid values are given in the drop-down list.

For .NET managed projects, this is equivalent to the ILTARGET Compiler directive.

Tip: Avoid building your managed projects for Any CPU if they include ActiveX references. Instead, set the particular target platform to either x86 or x64 to match the targeting of the ActiveX control.
COBOL dialect
Specify the COBOL dialect used by your code. This sets the DIALECT Compiler directive for the project accordingly.
Character Set
For mainframe project types only. The character set, defaulting to EBCIDIC, used by the application. Equivalent to the CHARSET Compiler directive, and can be overridden by using a $set statement in the source code.
Source format
The default source format for source files. This is one of Fixed, Variable, or Free. Equivalent to the SOURCEFORMAT Compiler directive, but can be overridden (and often is) by using a $set statement in the source code.
Compile for debugging
With this option set, the Compiler creates files containing extra information about your application that is used for debugging; sets the ANIM compiler directive.
Multi-processor compilation
Only applies to native COBOL. Enables a faster, parallel compilation of the source code in your project on multi-CPU machines.

You need to specify the number of Maximum concurrent COBOL compilations in Tools > Options > Micro Focus > Projects where, by default, this number is automatically set to the number of CPUs of your computer.

Restriction: Should be avoided for native Object-Oriented COBOL.
Define DEBUG constant
Adds constant DEBUG(1) to the build directives for managed code and in Debug configurations. Setting the DEBUG constant in this way enables you to use the System.Diagnostics.Debug class in your applications to ensure they write diagnostic information in the Output window for projects compiled for Debug but not for projects compiled for Release.
Compile to .gnt
Check this to compile your application to .gnt code. This setting only applies to INT/GNT projects or to native projects whose Output type is set to INT/GNT on the Application tab in the project properties.
Build Events
The commands to be executed before or after the build and when to execute them. See the Visual Studio Help for details.

Mainframe

EXEC CICS
Check this to specify CICS options for your project.

Click Options to set CICSECM options as follows:

Unsupported function handling
Choose the behavior if the source code contains an unsupported CICS function. This applies only to functions that are recognized (but unsupported) by the CICS preprocessor.
Compiler error
The default is that the CICS preprocessor treats unsupported CICS functions as Compiler errors.
Treat as comment
Any unsupported functions are treated as comments (that is, ignored).
Abend at runtime
Any unsupported functions result in an abend at run time.
Unsupported option handling
Choose the behavior if the source code contains an unsupported option. This applies only to options that are recognized (but unsupported) by the CICS preprocessor.
  • Compiler error - the default is that the CICS preprocessor treats unsupported CICS options as Compiler errors
  • Treat as comment - any unsupported options are treated as comments (that is, ignored by the preprocessor)
  • Abend at runtime - any unsupported options result in an abend at run time
  • Ignore at runtime - any unsupported options are ignored at run time
Raise ECM error level to Severe (Level S)
Changes all ECM warnings and errors to Severe errors and fails the build.
Additional CICSECM options
Specify additional CICS directives for your project as required. The syntax is as follows: CICSECM (option=setting). For example, CICSECM(EXCI=YES).
EXEC DLI
Check this if your programs contain EXEC DLI statements.

Click Options to set EXEC DLI options as follows:

DIB Group name
Specify the name of the DL/I Interface Block (DIB) group placed in your application program by the preprocessor at 01 level, or accept the default value, DLZDIB.
DIBVER value
Specify the version of the DL/I Interface Block (DIB) group placed in your application program by the preprocessor at 01 level or accept the default value. This field is provided for compatibility with IMS/ESA.
Additional directives
Specify any additional IMS preprocessor directives.

Errors and Warnings

The Errors and Warnings fields enable you to choose what warnings and errors will be displayed when you build the specified configuration.

Warning level
Specifies the severity of errors or the warning messages that are displayed in the output console.

The default warning level for new COBOL project is Include recoverable errors (Level E). This also includes severe (Level S) and unrecoverable (Level U) errors. After creating a project, Micro Focus recommends you set its warning level to Include warnings (Level W) where appropriate to help avoid potential coding problems.

Stop after
Specifies the maximum number of errors or the warning messages that will be displayed during the build.
Treat warnings as errors
Stops the build when a warning is received.

Output

Output path
The directory that contains the build output files. The output path may differ for native and managed projects.

For .NET managed code this is equivalent to the ILOUTPUT Compiler directive.

Generate directives file
For each individual COBOL program, ProgramN.cbl, in the project, this generates a separate file, ProgramN.dir, in the output folder for the active configuration of the project. Each file contains the directives that are used to compile the respective COBOL program.

For managed single-output projects, this only generates a single file, ProjectName.dir, with the directives that are used to compile the project.

Note: Cleaning the project deletes the directives files.
Generate listing file
Check this to generate a standard Micro Focus listing file, filename.lst, containing the original COBOL source statements with any warning or error messages included for each filename.cbl file in your project. By default, the files are saved in a Listing subfolder within the project directory. This is equivalent to setting LIST() and LISTPATH".\Listing\" directives.

To specify a different location for storing the listing files, type LISTPATH"path" in the Additional Directives field on the COBOL page in your project properties.

Cleaning the project deletes only the listing files that are saved to the default Listing subfolder of the project.

Enable code coverage
Check this to enable Enterprise Developer to log code execution details for each program and sub-program when you run the application. See Code Coverage (Native COBOL) in your product help for more details.
Enable profiler
Check this to enable the Profiler utility to collect detailed statistics on the run-time performance of your application. For more details, see Profiler in your product help.
Warning: If you are collecting Profiler statistics, you must not compile your application with both Enable profiler and Enable code coverage checked. Compiling with Enable code coverage adds instrumentation information to your build outputs which is designed for use by the Code Coverage utility. This extra information could affect the results of your Profiler run.

If you have both options enabled, to collect Profiler statistics you need to disable Enable code coverage first, recompile your application and then start your application using Debug > Run with Micro Focus Profiler.

Smart Linkage

This setting is only supported for managed COBOL projects.

Expose group linkage items to managed code
Check this to generate one class for every 01 level group item in the Linkage Section of your programs when compiling to managed COBOL. This exposes each data item in the group as a property of this class, where the property is of a standard managed type. Equivalent to setting the ILSMARTLINKAGE Compiler directive.
Options
Click this to set additional Compiler directives when compiling with ILSMARTLINKAGE:
Prefixes to remove from the names of the COBOL data items
Specify the prefixes to remove from the data items on your code. Use space as a separator when specifying more than one prefix, for example - lnk-b link-. Equivalent to setting the ILCUTPREFIX Compiler directive.
Expose as serializable classes
Check this to make the classes generated with ILSMARTLINKAGE serializable. Equivalent to setting the ILSMARTSERIAL Compiler directive.
Expose as nested classes of the program class
Check this to expose the Linkage Section items and entry points to managed code as nested classes of the program class in which they are defined. Equivalent to setting the ILSMARTNEST Compiler directive.
Limit property generation to non-redefining elementary items
Check this to limit the generation of properties in the classes produced when compiling with ILSMARTLINKAGE to non-redefining elementary items. This is equivalent to setting the ILSMARTRESTRICT Compiler directive.

Additional Directives

This field enables you to specify additional COBOL Compiler directives to pass to the Compiler.

Advanced

The Advanced COBOL Settings dialog box enables you to specify the following settings:

General
Additional copybook paths
The paths to search for copybook files that apply only to the selected build configuration of the current project. This enables you, for example, to have different copybook paths for debug and release builds. Use semicolon as a delimiter when entering multiple copybook paths.

This option sets the COBCPY environment variable, which is appended with the COBCPY setting in the Registry.

You can specify general copybook paths that apply to the project regardless of the active build configuration on the Copybook Paths page of your project properties. The configuration-specific copybook paths take precedence over the project copybook paths.

Verifiable code
This setting applies to managed code only. Check this if you want to generate verifiable code. By default, the build produces non-verifiable code as this ensures a better performance of the Compiler.
Note: Projects created using the SQL Server Database template have this option enabled by default. Verifiable code is required in the SQL Server Database environment.
Generate 64-bit pointers
This setting is available for managed projects only. Compiles the project with 64-bit pointer support enabled. Equivalent to the P64 Compiler directive.
Output
Register for COM interop
This setting is available for .NET managed code only. Value of true or false, to determine whether or not to register the build output as a COM component, which allows non-.NET code to use the project as if it was a COM object.
XML documentation file
This setting is available for .NET managed code only. Generates documentation in XML format that includes the comments you have made in the source code about the used methods and classes. Equivalent to the ILDOC Compiler directive.

Build Settings

Displays the build directives that are passed to the Compiler.