4 minute read time

Introducing Micro Focus Enterprise Visual Studio Code extension

by   in Application Modernization

Introduction

Developers are the backbone of software delivery. They perform a varied array of tasks to facilitate the delivery of quality software but at the heart of these is the need to edit, build and debug code.

VS Code was designed to deliver a simple platform for development when that is all that is needed.

But what about the mainframe?

With a plethora of extensions, supporting a large number of languages, VS Code is well known to developers of distributed applications. That same simplicity is equally relevant to developers of mainframe subsystem applications that run on either the IBM z platform or have been replatformed to Micro Focus Enterprise Server.

 At Micro Focus, we have decades of experience providing contemporary development environments for mainframe developers. To continue and expand on that legacy, we have introduced the Micro Focus Enterprise extension for VS Code. This builds on the already available Micro Focus COBOL extension and where applicable, combines with the Micro Focus ZMF Explorer, to provide a simple, lightweight development environment for mainframe developers.

So, what do you get?

The Micro Focus Enterprise extension is free to use as-is but when coupled with Micro Focus Enterprise Developer for Z delivers a more complete development environment. 

Edit

A core capability of VS Code is syntax highlighting. The Micro Focus Enterprise extension provides that for mainframe code components such as Enterprise COBOL, PL/I, BMS macros and JCL etc. (as shown)


Figure 1- Editing BMS Macros


Figure 2- Editing COBOL


Figure 3- Editing JCL


Figure 4- Editing PL/1

Another important capability is Intellisense. This is used to assist the developer when writing code by validating syntax and suggesting variable names interactively. The Micro Focus Enterprise extension uses the standard VS Code word based completions to provide this support for mainframe code.


Figure 5- Smart Editing functions

COBOL Language Server support.

When coupled with Micro Focus Enterprise Developer (Version 8.0 or above), COBOL Language server support is provided, delivering a much richer Intellisense. This includes features such as context aware completions, Go to Definitions and References, Peek and Error reporting. It also provides a program Outline view to assist navigating around the code.


Figure 6 -COBOL Language features 

Build

Using the Micro Focus Enterprise extension in conjunction with Micro Focus Enterprise Developer for Z, provides the ability to build the mainframe components.

The Micro Focus Enterprise extension enables a developer to add a Default Build Task in VS Code, using Apache Ant, MSBuild or command line compile to build the varying mainframe source components


Figure 7- VS Code Build task

The build process interacts with the Problem Matcher within VS Code to highlight any syntax errors found, which can be used to assist the developer in fixing code syntax issues quickly.


Figure 8- Integration with the Problem Matcher 

Debug.

Micro Focus Enterprise Developer for Z also provides an execution and debugging environment that delivers functional equivalence for applications written for IBM z subsystems.

The Micro Focus Enterprise extension can interact with this runtime to enable line by line debugging from within VS Code.

This is achieved by adding a debug configuration in launch.json.


Figure 9- VS Code Debug configuration

On starting a debug session, a connection is made with the execution environment, waiting for a debuggable program to be executed. Typically, this would either be initiated via a 3270 interface or service request for a CICS program, the submission of a JCL for a batch program.

Once the related code is loaded into the debug window, a developer can use the Debug Widget to step through the code, as they would with debugging a distributed application.

During the debugging session, a developer has access to all the typical debugging features, such as viewing variables along with their values, watchpoints and breakpoints, both static and conditional.

Using the Micro Focus Enterprise extension, it is possible to debug applications written in both COBOL and PL/I.


Figure 10 - Active debug session for COBOL


Figure 11- Active debug session for PL/1 

Summary.

The Micro Focus Enterprise extension for VS Code helps provide a simple and lightweight development environment for the delivery of changes to applications either deployed back to the IBM z platform or Micro Focus Enterprise Server.

It provides the core capabilities of Edit, Build and Debug within a framework that is both simple enough for adoption by existing mainframe developers and a familiar enough to enable the introduction of new developers to world of mainframe development.

Coupled with the power and flexibility provided by Micro Focus Enterprise Developer for Z, it can be utilised to provide agile development using existing On-Premise compute capacity or take advantage of elastic and scalable resource such as containers or the cloud, running on both Windows or Linux. 

Why not try it out here

Labels:

Enterprise Developer
Mainframe