Editing REXX code in VS Code

Dana Boudreau
Modern Mainframe
Published in
3 min readJul 28, 2020

With the new REXX extension released by Broadcom, editing REXX programs is more streamlined than ever. From the familiar development environment of VS Code, you can now get the advanced edit experience you are used to with other languages.

REXX (Restructured Extended Executor) is a simple interpreted programming language developed by Mike Cowlishaw and released by IBM in 1982. As a free form programming language that includes functions like easy access to system commands and facilities, simplified I/O, and crash protection it has become the primary scripting language on zOS and other operating systems. Although its popularity peaked in the 90’s, many data and text processing and report generating tasks are accomplished using REXX. Many programmers and system people need to modify and create new REXX execs and now, with this new extension to VS Code, this is now easier.

VS Code is a very popular interactive development environment (IDE), which supports numerous extensions available through the VS Code marketplace . This new extension, named REXX Language Support, will also be available there. This extension uses Language Server Protocol (LSP), a UI technology developed by Microsoft described further in this article. LSP is supported in VS Code and many other edit environments.

So let’s get into the user experience you can expect while editing REXX in VS Code. The extension works with files having .rex, .rexx, .zrx or .rxj extensions. The file can be local to the VS Code installation or you can use Zowe CLI to copy it from the mainframe to your machine. I find the easiest way to edit with mainframe code is through Zowe Explorer where you can easily open your REXX exec’s.

Syntax Highlighting

When you first load the editor with a REXX program you will quickly see the syntax highlighting capability. This improves the ease of reading the REXX language and allows for easy identification of syntax errors that can be hard to notice

Auto Complete

You need to change a REXX exec, or maybe write a new one, but you aren’t too sure about the language keywords. The extension provides suggestions for the most likely keywords as you are typing.

Syntax check

If you make a mistake, the extension will analyze the content of the REXX exec and find errors, highlighting them with a squiggly underline.

Give it a try by installing it into VS Code from the marketplace.

Give us feedback on SLACK at #che4z-rexx-language-support . Try out the other Broadcom mainframe developer extensions in Code4z or Zowe Explorer at https://marketplace.visualstudio.com/items?itemName=broadcomMFD.code4z-extension-pack

For more information about the Language Support Protocol (LSP), see this article: LSP Magic — Mainframe Language Support in Modern IDEs.

--

--