IBM Z® Open Editor makes building COBOL, PL/I, and HLASM applications easier with User Build

by Kristina Mayo

There is a new exciting feature in the IBM Z Open Editor VS Code extension, it's called User Build. User Build allows you as a z/OS® developer who writes COBOL, PL/I, or HLASM to build your applications directly out of VS Code or CodeReady Workspaces.

This feature is created for you if you are an IBM® Dependency Based Buildopen in new window user and would like to try developing in VS Code. User Build enables you to:

  • Build applications without interrupting your workflow and going outside the IDE.
  • Quickly compile code changes without opening a pull request or sharing the code with others.

Architectural overview

As an overview, User Build builds a program by performing the following tasks automatically:

  • Uploads the application file to z/OS.
  • Uploads the application's copybooks and include files to z/OS.
  • Invokes the remote build script that you defined in User Build settings.
  • Downloads build log files locally for easier viewing.
User Build diagram

Notes:

  • User Build does not require Git to work.
  • User can specify a custom script to execute for User Build, though DBB with zAppBuild solution is recommended.

Prerequisites

Before using the user build feature, ensure that the following host and client requirements are met.

Host requirements:

Client requirements:

User build settings

Before running User Build, you need to configure it via settings to tell User Build where on z/OS to upload files and which build script to execute. The settings should be defined and store as JSON inside VS Code settings filesopen in new window.

User Build has 2 types of settings: workspace settings and user settings, though both can be placed inside workspace settings file for convenience. See user build docsopen in new window for detailed descriptions of each setting.

The following example shows workspace and user settings are all stored inside zopeneditor-sample/.vscode/settings.json for convenience. User Build settings example

Running User Build

Once settings are filled out, right-click inside a file in the editor, select Run IBM User Build to execute remote script and see results directly in VS Code.

User Build menus inside VS Code

The user build log will be streamed in the Output panel inside VS Code. The build is successful when you see the message Build State: CLEAN in the output. The picture below shows successful zAppBuild output for a COBOL application and a log file.

User Build successful COBOL build

Trying out User Build

To get started with User Build, follow this hands-on tutorialopen in new window to use IBM's sample code and the defined workspace settings in the repository.

For full documentation, refer to Setting up the user buildopen in new window.

Last Updated:
Contributors: KRISTINA MAYO, Min Huang, Hestia Zhang, Peter Haumer, kmaselli