COBOL Properties

The properties you specify on the COBOL page in the project properties apply to the selected configuration.
Note:
  • Folder properties only apply to folders loaded in Solution Explorer using Open > Folder.
  • You can set file properties that differ from the ones set for the project or for the folder. In this case, the properties set on file level take precedence over those set for the project or for the folder. 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.
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. If this option is not set, NOANIM is set.
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.

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 Visual COBOL 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.
Trim trailing spaces from string properties
Check this to trim any trailing spaces from a string item returned by the get property associated with an alphanumeric item processed by ILSMARTLINKAGE. This is equivalent to setting the ILSMARTTRIM Compiler directive.
Apply .NET Attributes to generated properties
Check this to apply attributes to the properties generated as a result of ILSMARTLINKAGE. It applies the System.ComponentModel.DataAnnotations.StringLengthAttribute attribute to the properties of an alphanumeric data item, and it applies the System.ComponentModel.DataAnnotations.Range attribute to the properties of a numeric item. This is equivalent to setting the ILSMARTANNOTATE 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.
Debugging information
Only applies to managed projects. Specify what type of debug information should be produced by the Compiler:
  • Default - the generated information depends on whether Compile for debugging is checked:
    • For applications that target the .NET Framework - either full information, when the check box is enabled, or no information at all.
    • For applications that target the .NET Core - either portable information, when the check box is enabled, or no information at all.
  • Full - enables attaching to the running program
  • Portable - generates a portable symbol file (.PDB). .PDB files are platform indpendent files that include details about how the main executable file was produce and what its contents is.
  • Embedded - embeds portable symbol information directly in the assembly without producing a .PDB file.

Build Settings

Displays the build directives that are passed to the Compiler.