Example - Building COBOL Programs

The following example shows how to use Jenkins projects to build COBOL source code.

You are going to use Visual COBOL and one of the MFUnit Airport samples to see how to use Jenkins to build a COBOL application. The sample is stored in the \COBOL\AirportMFUnitDemo subfolder in the location of the Visual COBOL samples (which is c:\users\Public\Documents\Micro Focus\Enterprise Developer\Samples\COBOL\AirportMFUnitDemo by default).

Example of Building COBOL Programs with an Eclipse Project

Before you create a Jenkins project, ensure that the following software is installed on the machine where you will build the sample:

  • Visual COBOL for Eclipse
  • Apache Ant

To create a Jenkins project for building the sample:

  1. Create a new freestyle project.
  2. Configure the project to work with COBOL - see Setting up the Environment.
  3. In the Build section of the project's configuration, specify the command that will build your COBOL project:
    cd C:\Users\Public\Documents\Micro Focus\Enterprise Developer\Samples\Eclipse\cobol\AirportDemo
    call ant -f .cobolProj
  4. Click Apply and then Save.
  5. Click Build to build the project.

See To Build a Project Using Apache Ant for some useful Ant options you can use to build your projects.