Previous Topic Next topic Print topic


To compile individual files

Restriction:
  • You can only compile individual COBOL programs that are part of a native project.
  • It is not possible to compile copybook files.

To compile an individual COBOL file that is part of a project:

  1. In Solution Explorer, right-click the file you want to compile.
  2. Click Compile.

    This option is not available when a build is already in progress or when you are debugging the application.

To compile a single native COBOL file that is not part of any project:

  1. Open the file in the editor.
  2. Check the Compiler directives that the IDE applies when building the file - right-click in the editor, and click Compiler Options.

    This opens the Single File Compile page in Tools > Options > Micro Focus > Directives.

  3. Ensure the directives are relevant to the program that you are going to compile, and click OK.
  4. Right-click in the editor, and click Compile.

    You can cancel the compile process by right-clicking in the editor and clicking Cancel Compile.

    Compiling produces an .idy file that the IDE uses to provide some features in the editor such as colorization and navigation.

The recommended way to work with Visual COBOL is to include all source files in a project because this enables full support for the IDE editing, compiling and debugging features. To enable this support for single files, Visual COBOL provides a path for creating projects from them - right-click the file in the editor, and click Create COBOL Project.

Previous Topic Next topic Print topic