Example - Building Mainframe Applications

The following example shows how to use Jenkins projects to build a mainframe applications.

You are going to use Enterprise Developer and the BankDemo sample stored in the \Mainframe\BankDemo subfolder in the location of the Enterprise Developer samples (which is c:\users\Public\Documents\Micro Focus\Enterprise Developer\Samples\Mainframe\BankDemo by default).

Example of building a mainframe project with Jenkins

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

  • Enterprise Developer for Eclipse
  • Apache Ant, version 1.8 or higher - see the Ant installation manual for instructions on how to set this up

Prepare your mainframe application:

  • Start following the instructions in the tutorial Getting started with Micro Focus Enterprise Developer until you complete all of the steps in Creating a Project.

To create a Jenkins project for building the sample:

  1. Create a new freestyle project.
  2. In the Build section of the project's configuration, specify the command that will build your mainframe COBOL project - for example:
    call "%ProgramFiles(x86)%\Micro Focus\Enterprise Developer\setupenv.bat"
    set JAVA_HOME=%ProgramFiles(x86)%\Micro Focus\Enterprise Developer\AdoptOpenJDK
    set ANT_HOME=C:\TOOLS\apache-ant-1.9.6
    set PATH=%ANT_HOME%\bin;%PATH%
    set ANT_OPTS=-Xmx1024m
    cd C:\MFETDUSER\BankDemo\Projects\Eclipse\Bankdemo
    call ant -lib "%ProgramFiles(x86)%\Micro Focus\Enterprise Developer\bin\mfant.jar" -f .cobolBuild

    Modify the instructions above with the install locations on your machine. These set the environment and build the project as follows:

    • Set up the environment using setupenv.bat - see Setting up the Environment
    • Set JAVA_HOME and ANT_HOME, and add ANT_HOME\bin to PATH, sets the required Ant options.
    • Performs a build using Ant by calling the mfant.jar provided with the Enterprise Developer installation.
  3. Click Apply and then Save.
  4. 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.