A New Build Tool That Mainframe Software Developers Cannot Miss

An introduction to Endevor Team Build

Chong Zhou
Modern Mainframe
8 min readSep 20, 2021

--

As a Mainframe software developer, what is your typical routine for programming? Well, let me guess…

  1. Find a solution;
  2. Edit the source code;
  3. Rebuild the program;
  4. Run the tests;
  5. Analyze the logs and/or the listings;
  6. Go back to step 2.

Is that you? To resolve a complex problem, you often iterate the above loop tens or hundreds of times. We all know that, for junior developers, repeating the above routine inside the so-called “green screen” might be a pain. It could even keep them away from Mainframe.

The “green screen” window for Mainframe developers

Think of it: you need to repeatedly switch between the editor, the SCM, and the output viewer (i.e., Sysview or SDSF) in order to build the program, submit the test jobs, and wait for them to complete so you can examine the job logs. Not to mention that building the program is not always an easy task, especially when the dependency relationship is complex.

Of course, you know that the next generation of developers’ lives are much easier than yours because they have a lot of no-brainer toys to use. When they finish coding, they only need to, for example, press F5 to build and run, and sit back with a cup of coffee in hand.

Feel jealous? No need — you now have Endevor Team Build. It works smoothly with powerful collaboration tools such as Git and modern IDEs such as Visual Studio Code. With some easy setup, you too can enjoy the benefits of modern tools.

What’s Included?

Endevor Team Build includes 4 major components:

  • Syncz: a file synchronization tool that keeps your working directory in sync with a build area on your mainframe LPAR’s USS filesystem.
  • Bldz: a general-purpose build engine that drives the compilers and binders on the Mainframe to build your software project.
  • Exportz: a special tool that allows you to initialize a Team Build project from your Endevor project’s source, automatically creating Team Build scripts from existing Endevor build logic.
  • Publishz: a mini tool that helps you work with binary repositories inside your build script.

Want to Try it Out?

4 steps of preparation in 10 minutes

First of all, you need to download the package and unzip it. Please refer to this document for how to download the product. You can also contact the product manager for an install package with a free POC license.

Please note that the following steps will guide you through a very simple trial for Endevor Team Build. Only a small portion of its functions will be involved, so you will be relaxed and have fun with it.

Step 1: Select the correct Syncz program.

You will find 3 folders: “darwin_amd64”, “linux_amd64”, and “windows_amd64” in the folder “package\syncz\bin” of the unzipped package. They are for macOS, Linux, and Windows respectively. Choose the correct one according to the platform of your PC and add the path of the folder to the PATH environment variable.

After that, type the following command. Syncz is correctly deployed if you can see the version information shown as below:

Confirm if syncz works on your PC

Step 2: Generate an SSH key pair.

(Optional step. Skip to the next step if either your company’s security policy does not allow it, or you have already set it up.)

First, generate an SSH key pair by typing “ssh-keygen” in a terminal and follow the prompts. For simplicity, I recommend you use all default values and press Enter without input until it returns I to the command prompt:

Generate SSH key pair

Second, send the public key generated above to the USS system of the LPAR.

For Windows Powershell users, type the following command:

For Linux/Unix/Mac/Cygwin(i.e., Git bash) users, type the following command:

You will be asked for the password. Use your z/OS password.

Notice: to confirm if the SSH is working properly both in your local computer and the USS, you can try to logon by the following command (for both Powershell and Linux-like users):

If you do not know your ssh port, just ignore the “-p your-ssh-port” parameter.

Step 3: Create a utility directory in your USS home and add it to PATH.

Logon to the USS system, create the directory, and add it to PATH by issuing the following 3 commands:

Create “bin” directory in USS home and add it to PATH

Now you have a “bin” directory in your USS home. We will put all Endevor Team Build programs that we will use for this simple trial into this folder later.

Step 4: Upload the Bldz and Syncz programs to the USS.

You will find the executable file “bldz” in the folder “package\bldz\bin” of the package and the file “syncz” in the folder “package\syncz\bin\zos”. Upload them to the “bin” directory created previously. Do not forget to set execution permission for them.

After that, you can confirm if bldz works in your USS system by the following command:

Confirm if bldz works in your USS system

Also confirm if the syncz works by:

Confirm if syncz works in your USS system

Now that we have deployed our programs, we can try Team Build.

Try Endevor Team Build with a hello-world COBOL project

In the following paragraphs, I will assume you are experienced with Microsoft Visual Studio Code.

Step1: Create a hello-world COBOL project

First, create a folder “hello-cobol” on your PC and start the Visual Studio Code:

Create a folder for the hello-world project and start VisualStudio Code in it

Next, let’s create 3 files in the VisualStudio Code. The first one is a COBOL source code file. You can name it whatever you like but make sure the file name ends with “.cbl”. Copy the following content into the file:

The second one is a build script for Bldz. The file name must be “BUILDZ.js”. It is case-sensitive. Copy the following content into the file:

The last one is a file-sync script for Syncz. The file name must be “syncz.yml”. It is case-sensitive too. Copy the following content into the file and correct the text in bold according to your environment.

Now we are almost ready to go. Look at the picture below and make sure you have all the files prepared:

Make sure you have all the 3 files in the project

Step 2: Let’s rock!

Press CTRL+` in your Visual Studio Code to open the terminal panel. Type the following command:

The file-sync command to launch the hello-world project

The above command tells Syncz to copy/update the local directory to the USS and run the build command.

If everything is correct, the COBOL program will be transferred to the USS, built, and executed. You should see the “Hello, World!” message in the terminal and the file-sync program pauses watching for file changes.

The “Hello, World!” is seen and Syncz is watching for file changes.

Now let’s try to make a small change to the source code. Locate the statement below:

Change it to:

As soon as you press CTRL+S to save the change, you will see the changed file is automatically transferred to the USS, the project is rebuilt, and the new message “Hello, COBOL!” appears.

The project is auto-updated and rebuilt. The new message “Hello, COBOL!” is seen.

If the file-watch mode is too aggressive for you, replace the “-w” option with “-i”, thus you trigger the file-sync by pressing Enter in the terminal panel when you are ready to test.

What’s next?

For simplicity, many important but complex features are not demonstrated, including but not limited to:

  • Initialization of a Team Build project from a traditional Endevor project;
  • Declarative and automatic dependency management;
  • Artifacts and compiler listings auto-collecting and back-sync;
  • Replace your JCLs and shell scripts with Bldz Javascript scripts;
  • External dependency resolution;
  • Artifact publishing and (fully or incrementally) deploying;

and much more…

How do you feel?

The above is what modern Mainframe software development work looks like:

  • You work in Visual Studio Code just like other developers do;
  • You press Enter to build what you changed just like other developers do;
  • You resolve external dependencies in the build script just like those Maveners or Gradlers do; (Will show this in the future)
  • You work on your local PC and change/run the program on the remote server without having to log on to the server … well, not every modern software developer can do that!

…and remember: these are not in the future tense.

Modern Mainframe software development started when the Open Mainframe Project was founded 5 years ago. During this time many new tools (i.e., the Code4z extension package for Video Studio Code)and frameworks (i.e., Zowe)have been introduced, changing the way Mainframers work. I believe Endevor Team Build is a life-changing tool that you shouldn’t miss — so get it and try it out.

If you are a decision-maker in your organization and would like to know more about Endevor Team Build and modern DevOps for Mainframe, here is another good story for you.

If you are a program developer or a DevOps engineer, maybe you would like to take a closer look at the standard build script library of Endevor Team Build. If you want to see how we use that library to build a COBOL/CICS application with only a few lines of script code, stay tuned with us for the next blog.

--

--