Mainframes are used by 71 percent of the fortune 500 companies, Mainframe is still the king in most of the industries, take a look at this amazing blog from precisely:

As we all know mainframes are still playing a major role in our lives, I think the mainframes are here to stay and only get better and stronger. The major issue with using mainframes boils down to just two things.

a) Mainframe is expensive, a large mainframe of more than 11,000 MIPS would cost annually about 16 million dollars.

b) Mainframe tech is old, its hard to bring the cool kids to work on mainframe.

Companies like AWS, Microfocus etc are heavily investing to migrate data/applications to cloud. They have been really successful in their initiatives so far. But Mainframe is still there to stay, as some of the applications running in mainframe are so critical to their businesses. Mainframe is still a fraction of cost which they are willing to incur. So lets leave this to the big guys, lets focus on bringing the cool kids back to the mainframe 🙂 , lets give it a shot!

I understand when you see these boring ISPF panels and pretty dumb user interface for doing your development. No auto complete, no highlights, no tool tips and the list goes on and on.

We are going to use a few tools to make mainframe development easier and fun, here are those:

a) Zowe is an integrated and extensible open source framework for z/OS. Zowe, like Mac OS or Windows, comes with a set of APIs and OS capabilities that applications build on and also includes some applications out of the box.

Zowe offers modern interfaces to interact with z/OS and allows you to work with z/OS in a way that is similar to what you experience on cloud platforms today. You can use these interfaces as delivered or through plug-ins and extensions that are created by clients or third-party vendors.

Zowe is composed of several components, each improving the learning ability, accessibility, and possibility of mainframe development.

b) IBM Z Open Editor is for developers interested in Z enterprise application development, especially those who prefer a modern development environment. By bringing IBM z/OS language support to one of today’s most popular code editors, Visual Studio Code (VS Code), IBM Z Open Editor gives developers the freedom to code in COBOL, PL/I, High-Level Assembler, or REXX using the same editor they can use for languages such as Java and JavaScript. IBM Z Open Editor is a FREE, easily downloadable extension in Visual Studio Code’s marketplace.

c) Visual Studio Code is a code editor redefined and optimized for building and debugging modern web and cloud applications. But lets use it for legacy applications!

Finally, after all that boring lecture which was kind of necessary to set the stage, we are going to start looking at the actual implementation now.

Step 1: Installing the Node package manager

Node Package Manager (NPM) is a command line tool that installs, updates or uninstalls Node.js packages in your application. It is also an online repository for open-source Node.js packages. The node community around the world creates useful modules and publishes them as packages in this repository.

NPM is included with Node.js installation. You can download the Node.js from

After you install Node.js, verify NPM installation by writing the following command in terminal or command prompt.

NPM version

Step 2: Installing the Visual Studio Code

Visual Studio code is a popular IDE, just google and you can get tons of material on VS code, so just giving you the download link:

Step 3: Lets get the plugins installed in your Visual studio code

Open your VS code, and click on the extensions , now search for “IBM Z Open editor”, look at the screen shot below:

IBM Z Open Editor

If you read through the details of this extension, you will notice that Zowe explorer is automatically installed when you install IBM Z Open Editor extension. See below:

“To interact with z/OS, this extension also automatically co-installs the Zowe Explorer VS Code Extension. This extension can be used to edit COBOL, PL/I, HLASM, REXX, and JCL files opened on z/OS MVS™ and USS using the Zowe extension’s Data Sets and USS views. It can even run JCL jobs via right-click and let’s you download and browse job spool files. Note, that since Z Open Editor version 2.0.2 version 2.0.0 or newer of Zowe Explorer is required.”

Now that you have installed the extension, let’s find where ZOWE explorer is:

ZOWE explorer

Make sure that ZOWE jobs are running on your mainframe as well, If it isn’t then talk to your mainframe administrator to get ZOWE up and running . This blog does not talk about installing ZOWE in the mainframe.

Let’s configure ZOWE by adding a profile, connect to the mainframe , and then use some of those cool IDE features with the help of the IBM Z open editor plugin.

Click on the “+” button next to data sets and create a new connection to z/OS.

Create new connection to z/OS

It will prompt for the following:

a) Connection name

b) Select the profile type as zosmf

c) Your z/os host name eg:

d) Your port eg: 443

e) Your mainframe user id

f) Your mainframe password

g) True/false selection for self signed certs, I select false as I am ok to accept it, then ignore the next step by hitting enter if you selected false.

Great work!! You are connected to the mainframe now. Now click on the magnify glass button next to your profile and give the wildcard or full PDS name in the search

search for your PDS

Edit JCL using VScode

You can use the auto complete feature provided by the IBM Z open editor plugin. You don’t have to type the whole thing, it will give you intelligent suggestions when you start writing your code, It comes pretty handy for me.

Look at the cobol code, nicely highlighted and indented, it also shows the unreachable code with yellow lines !!

Cobol code – showing the unreachable statements

You can even right click this, and “format document”, it will format the document nicely for you, so no one will know you right badly indented code in your ISPF panel :). Fix it before someone finds it!

There are tons of uses with ZOWE CLI as well, but that is for another blog. I hope you had fun reading this, and please feel free to ask me any questions in the comments , I will be glad to assist you.

One thought on “Access mainframe from visual studio code – Using Zowe explorer and IBM Z Open Editor extensions.”

Leave a Reply

Your email address will not be published.