Tuesday, May 27, 2025

Modern Mainframe tools I use daily. Plus, a blog milestone!

A few days ago, I stumbled upon the Code4z Extension Pack for Visual Studio Code at my workplace. This bundle brings several modern tools to Mainframe developers right within VS Code. Here's what it includes:

✅ COBOL Control Flow
✅ COBOL Language Support
✅ Explorer for Endevor
✅ Zowe Explorer
⬜ Abend Analyzer for Mainframe
⬜ Data Editor for Mainframe
⬜ Debugger for Mainframe
⬜ HLASM Language Support

(I’ve highlighted the ones I’ve personally tried so far.)


Disclaimer:
The tools and setup showcased in this blog post were explored using my personal computer and a Mainframe ID obtained through the IBM Z Xplore learning platform. The content reflects my personal experimentation and learning and does not involve or represent any proprietary systems, data, or configurations from my workplace.

🛠️ Getting Started with COBOL in VS Code

COBOL Control Flow and the COBOL Language Support extensions were immediately put into use. I had already created a custom REXX tool that extracts the COBOL source code from Endevor Element Listing output (one advantage of this source code is that all the INCLUDEs on the COBOL program are expanded) and sends it via email as a .txt file. I'd then open this .txt file in VS Code and manually set the language mode of the file to COBOL.

You can easily find out that the file is recognized as COBOL source code with the help of syntax coloring.

📷 Click on the image to view it in full size.

A file with COBOL source code opened on VS Code. The language mode highlighted at the bottom right corner indicates COBOL. 


Right-clicking anywhere on the file presents you with a lot of useful options, my favorites being
  • Go to Definition
  • Find All References
  • Generate COBOL Control Flow
  • and, lately, Copilot.

COBOL Language Support features are shown upon right-clicking on the file. 

💡 Real Productivity Boosters

When analyzing a COBOL program using CA Endevor’s listing output mode, I often find myself jumping up and down the listing—switching between paragraphs to trace the program's flow. In the process, it’s easy to lose track of the original paragraph I started from, especially when the logic branches out deeply. I’ve often resorted to using a notebook just to jot down the key paragraph names to avoid getting lost.

This is where modern tools shine. With features like Peek Definition and Peek References, you can stay on the current paragraph and quickly explore where a variable, copybook, or another paragraph is defined or referenced—without losing context.

Now, I use Visual Studio Code instead of 3270 Terminal for any kind of COBOL program analysis, whether I’m debugging abends, understanding functionality, or implementing enhancements.

🔄 Visualizing Control Flow

Another useful feature is Generate COBOL Control Flow, which allows you to graphically visualize the COBOL program. 

🎥 Watch: COBOL Control Flow in Action

This 👇 video shows how the VS Code extension visualizes the control flow of a COBOL program, highlighting the entry point and relationships between paragraphs.

For me, the COBOL control flow helps answer questions such as

  • Where does the program begin execution? The flowchart clearly shows the entry point and how the control moves across different paragraphs or sections.
  • Are there any unreachable or unused paragraphs? If a paragraph exists but has no inbound flow, it may indicate dead or obsolete code.
  • How complex is the program?
  • Which paragraph calls which?  Instead of manually tracking PERFORM statements, you can visually trace the relationships between paragraphs.

Zowe Explorer & Endevor Integration

The next set of extensions that I configured were the Zowe Explorer and Explorer for Endevor. Though I've been using Zowe since 2020, this was the first time I tried my hand at it in a work setting. 

With the Explorer for Endevor extension, I was able to set up an Endevor synchronized workspace and retrieve elements on VS Code. This proved that the REXX tool to extract COBOL source code from listing output is futile. After all, why reinvent the wheel?

🤖 Using GitHub Copilot on the Mainframe

Thanks to GitHub Copilot access at work, my productivity has further improved. I use it along with Zowe Explorer for:

  • Writing/Debugging DFSORT

  • Resolving SQLCODE errors

  • Enhancing JCL scripts

  • and much more…

The use cases are endless. Here are some.

🧠 The Problem:

You wanted to create a DFSORT step that performs a transformation—like converting lowercase to uppercase—but weren’t sure about the syntax.

🛠️ The Workflow:

  1. You started writing your JCL in VS Code.
  2. Invoked GitHub Copilot's In-line Chat with a natural-language prompt:
    • “Finish the OUTREC to convert lowercase letters to uppercase.”
  3. Copilot suggested:
    • OUTREC FIELDS=(1,80,TRAN=LTOU)
  4. You tested the job and confirmed the expected result. This step is essential as the code generated by Copilot may not always be correct.

📽️ Demo:

👇 Here's a short demo of me using GitHub Copilot to complete a DFSORT JCL step:

🧩 Final Thoughts

Modern Mainframe tooling, especially with extensions like Code4z, Zowe Explorer, and Explorer for Endevor, has revolutionized how I approach development and debugging. VS Code has now become my go-to tool nowadays. If you're still sticking to just the green screen, I highly recommend giving these tools a try. You’ll be surprised how much more productive and enjoyable Mainframe development can become!

I'm planning a follow-up blog post to dive deeper into how GitHub Copilot can be integrated with Zowe - bringing native-like AI assistance to mainframe development tasks. Stay tuned!

Over to you! Have you explored any modern tools for mainframe development? I'd love to hear about your experiences. Drop a comment below, and let's keep up the conversation.

🏅 Featured Among the Top 30 Mainframe Blogs!

Before I wrap up this post, I’m thrilled to share a bit of good news. My blog has been ranked among the Top 30 Mainframe Blogs by Feedspot! 🎉

This recognition motivates me to continue sharing hands-on experiences from the Mainframe world. A big thank you to everyone who reads, shares, and engages with my content.