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 Build 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.
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:
- IBM Dependency Based Build configured on z/OS
- zAppBuild directory copied on z/OS and configured with data set references
Client requirements:
VS Code installed
Z Open Editor VS Code extension installed
Zowe™ CLI profiles created (to connect to z/OS)
User Build utilizes open source Zowe technologies to communicate with z/OS. For that reason, you need to have Zowe CLI profiles to tell User Build how to connect to z/OS.
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 files.
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 docs 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.
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.
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.
Trying out User Build
To get started with User Build, follow this hands-on tutorial to use IBM's sample code and the defined workspace settings in the repository.
For full documentation, refer to Setting up the user build.