Modern Tooling: VS Code and Zowe
|
This content was generated with the assistance of AI and should be verified against the official documentation before being relied on in production. The reference material consulted while preparing these pages is listed in the section bibliography. |
This page is written against ISO/IEC 1989:2023 (edition 3, January 2023; an upcoming 4th edition is in ballot), which defines the language and no tools; against IBM Enterprise COBOL for z/OS 6.5 (PTFs through September 2026) on z/OS 3.2; against GnuCOBOL 3.2 (28 July 2023, the latest release), with which the local build task on this page was run on 2026-10-20; and against Zowe 3.x (the 3.6.x line is the long-term-support line in the documentation at the time of writing). The product pages named below were looked at on the same day; where a page could not be read, the product is described in general terms and no release is named. Anything that needs a z/OS system, a licence or an account is labelled "z/OS; not run here", and no account was created or signed in to for this page.
For a list of IDEs, editors and compilers with links to their official pages, see IDEs & Tools.
Ten years ago a COBOL programmer on z/OS worked in a green screen (ISPF) and a COBOL programmer elsewhere used a text editor and a command line. Today the same programmer can work in Visual Studio Code, with syntax-aware editing, copybook navigation, data set browsing and job submission, all from a laptop, and can build the same program locally with GnuCOBOL. This page walks through those tools, in the order a Circulation developer would use them. The ISPF and JCL side is on The Mainframe Environment Primer and Data Sets and Mainframe Utilities; the pipelines these tools feed are on DevOps and CI/CD for COBOL; the debugger part of the tool chain is on Debugging and Troubleshooting.
Where the book is outdated: Taulli’s Modern Mainframe Development (2022, chapters 3 and 9) describes Zowe at its version 1 and 2 stage, with Node.js 8 or later and Java 8 listed as prerequisites for the tools, and with command lines and profile types of that era. The current line is Zowe 3.x. The prerequisites, the packages and the configuration (a single team configuration file in place of separate profile files) have changed, so the commands of the book’s chapters should not be copied: check them against the Zowe documentation for the release in use. The book’s list of IDEs (IDz, VS Code with Zowe, Che4z/Code4z, OpenCobolIDE) is a fair map; this page names the current products in each group and does not repeat the setup steps.
The tool landscape at a glance
| Tool | What it is for | Where it runs |
|---|---|---|
IBM Z Open Editor (VS Code extension) |
COBOL, PL/I, JCL and HLASM editing with syntax checking, outline, copybook and symbol navigation, and support for embedded CICS, Db2 and IMS statements; some advanced features need a licence after a trial period. |
VS Code on the workstation; reads and writes data sets through Zowe Explorer or a local copy of the source. |
Broadcom COBOL Language Support (Code4z, VS Code extension) |
Free language server features for COBOL and copybooks: autocomplete, diagnostics, highlighting, outline, go to definition, references; supports copybooks, subroutines and SQL keywords for Datacom, CICS and Db2, and only IBM Enterprise COBOL syntax. |
VS Code; integrates with Zowe Explorer to resolve copybooks stored in data sets and USS files. |
Zowe Explorer (VS Code extension) |
Browse and edit data sets, USS files and jobs on z/OS from the VS Code sidebar. |
VS Code; talks to z/OSMF or other services through the Zowe client. |
Zowe CLI |
A command line for z/OS: list, upload and download data sets, submit jobs, read spool output, run TSO and console commands, from scripts and CI. |
Workstation or CI server, Node.js based. |
IBM Developer for z/OS (IDz) |
IBM’s Eclipse-based development environment for z/OS with editors, build, debug and test tools integrated in one product. |
Workstation; licensed product. |
Rocket Visual COBOL (and Enterprise Developer) |
Micro Focus COBOL products, now sold by Rocket Software, that compile COBOL on Windows and Linux and can run it against emulated mainframe services. |
Workstation or server; licensed products. |
GnuCOBOL with VS Code |
A free local compiler and any COBOL extension for editing; the portable programs in this section build with it. |
Workstation or CI runner. |
VS Code with a COBOL extension
Install one COBOL language extension, not both: IBM Z Open Editor if the shop uses IBM tooling and licenses, Broadcom COBOL Language Support (free) if it uses Code4z. Both give the features that make a copybook-heavy program navigable: a document outline of the divisions, sections and paragraphs, go to definition for a data name or a paragraph, find all references, diagnostics from a parser as you type, and expansion of COPY members from a local folder or a data set. The Open Editor also supports the embedded EXEC SQL, EXEC CICS and IMS statements of recent releases and, with a licence, features such as a preprocessor and a data flow view; which of its features are free and which need the licence is stated on its Marketplace page, and should be checked before it is rolled out. The Broadcom extension documents that it supports IBM Enterprise COBOL only, so it does not understand GnuCOBOL-only syntax (for example some intrinsic functions that GnuCOBOL adds).
A workspace setting tells the extension where to look for copybooks, so a program that says COPY LOANREC resolves to the copybook folder of the repository. The setting names differ between the extensions and are documented by each; the folder layout of DevOps and CI/CD for COBOL (programs in src, copybooks in copybooks) works with both.
Zowe: Explorer, CLI and configuration
Zowe is an open source framework (Open Mainframe Project) that exposes z/OS to modern tools through REST services and a command line. Two parts matter to a COBOL developer.
Zowe Explorer is a VS Code extension: a data set tree (with patterns such as the Circulation USERID.CIRC.*), a USS file tree and a jobs tree. A member opens in an editor, saves back to the data set, and the job tree shows the spool output of a submitted job. It is how a developer edits USERID.CIRC.COBOL(LOANCHK) without a terminal emulator.
Zowe CLI is the same capability as commands, which makes it scriptable. The command groups used by a COBOL developer are zos-files (data sets and USS files) and zos-jobs (jobs and spool), with zos-tso, zos-console and others for further tasks. The connection is not typed on every command. It comes from a team configuration file, a JSON file that names the host and port of the z/OSMF service and which fields are stored securely; the CLI documentation describes the user-level and project-level variants of the file, and the zowe config commands that create and edit them. A minimal file for the Circulation team has this shape (the host is a placeholder from the reserved example.com domain, and no real values appear):
{
"$schema": "./zowe.schema.json",
"profiles": {
"zosmf": {
"type": "zosmf",
"properties": {
"host": "zos.example.com",
"port": 443,
"rejectUnauthorized": true
},
"secure": ["user", "password"]
}
},
"defaults": {
"zosmf": "zosmf"
}
}
The user name and password are marked as secure fields, so they are stored in the operating system’s credential store and never in the file; the file can then be committed to the project repository for the team, while each developer’s own credentials stay on their machine.
Typical commands for the working day, with the same data set names used on the other pages (z/OS; not run here):
zowe zos-files list data-set "USERID.CIRC.*" --attributes
zowe zos-files download data-set "USERID.CIRC.COBOL(LOANCHK)" --file src/LOANCHK.cob
zowe zos-files upload file-to-data-set src/LOANCHK.cob "USERID.CIRC.COBOL(LOANCHK)"
zowe zos-jobs submit data-set "USERID.CIRC.JCL(NIGHTLY)" --view-all-spool-content
zowe zos-jobs list jobs --prefix "NIGHTLY*"
The first lists the team’s data sets, the second and third move one program between the host and a working copy, the fourth submits the nightly job and waits for its output, and the last lists its instances. Options and defaults of each command are in the generated command reference, which is the authority; the command forms above are the same ones used on the JCL and data set pages.
IBM Developer for z/OS and Rocket Visual COBOL
IBM Developer for z/OS (IDz) bundles an editor, the compile and link steps, a debugger, code coverage, unit-test generation (zUnit) and related tools in one workstation product. It targets teams that want a single supported product from the vendor of the compiler and that already use the integrated pieces (the debugger and zUnit are described on the debugging and testing pages). The documentation is at the link below; the current release is not named here because the page could not be read for verification.
Rocket Visual COBOL and Enterprise Developer (the products that Micro Focus built and Rocket Software now sells) compile COBOL on Windows and Linux with their own compiler, which is dialect-compatible with IBM’s to a large degree, and can run CICS and file-based programs against emulated services. They are used when a team wants to develop and test COBOL without any mainframe connection or to run COBOL on distributed systems; the vendor documentation is the authority on dialects and licences.
A local GnuCOBOL build task for VS Code
For the programs that are portable, VS Code can compile and run with GnuCOBOL from a task. The file .vscode/tasks.json below defines two tasks: one compiles the current file into a build folder with -Wall -std=ibm and the copybook folder as the include path, the other runs the result. The problemMatcher turns the compiler’s file:line: warning: message lines into entries in the Problems panel.
{
"version": "2.0.0",
"tasks": [
{
"label": "cobc: build current file",
"type": "shell",
"command": "cobc",
"args": [
"-x", "-Wall", "-std=ibm",
"-I", "${workspaceFolder}/copybooks",
"-o", "${workspaceFolder}/build/${fileBasenameNoExtension}",
"${file}"
],
"group": { "kind": "build", "isDefault": true },
"problemMatcher": {
"owner": "cobc",
"fileLocation": ["relative", "${workspaceFolder}"],
"pattern": {
"regexp": "^(.*):(\\d+): (warning|error): (.*)$",
"file": 1,
"line": 2,
"severity": 3,
"message": 4
}
}
},
{
"label": "cobc: run current program",
"type": "shell",
"command": "${workspaceFolder}/build/${fileBasenameNoExtension}",
"dependsOn": "cobc: build current file",
"problemMatcher": []
}
]
}
The JSON parses, and the compile command it runs (with the variables replaced by VALLOAN.cob, copybooks and build/VALLOAN) built the validation program of the coding standards page with no warnings and ran it in a GnuCOBOL 3.2 container. The regular expression of the matcher was checked against real cobc output: for a program that moves to an undefined item, the compiler prints
bad.cob:7: error: 'WS-B' is not defined
7 > MOVE 1 TO WS-B
and the expression captures bad.cob, 7, error and the message from the first line; the source lines that follow are ignored. The task assumes cobc is on the path of the VS Code terminal; on Windows that is the GnuCOBOL installation folder, on Linux a package or a build from the release tarball, and on macOS a package manager or a container. VS Code’s own task variables (${file}, ${workspaceFolder}, ${fileBasenameNoExtension}) are documented by the editor.
Git for mainframe code
Source code on z/OS has traditionally lived in partitioned data sets with a library manager for versions. Git is now supported on z/OS and workstations alike, and shops move to it so that the mainframe code gets branches, pull requests and history like every other code base. Three practical points:
-
Code page. z/OS data sets are EBCDIC. The repository stores UTF-8, and a conversion happens when the source is transferred (Zowe CLI and Explorer convert on download and upload) or when Git checks out on z/OS (the file’s code page is recorded with a file tag or an attribute). Characters that exist in EBCDIC and not in the repository’s character set, for example the not sign, have to be handled once, with a documented mapping, or the same program differs after every round trip.
-
Line endings and trailing spaces. Fixed-format COBOL records are 80 columns wide and padded with blanks. The conversion should trim trailing blanks on the way in and pad on the way out, or every line shows as changed.
-
Tooling. Graphical Git clients for ISPF users exist (zigi is the one named in the book), and IBM’s dependency-based build (DBB) and the pipeline tools described on the DevOps page use the repository as the source of truth. The details are product specific and the documentation of each is the authority.
The workflow itself is the same as in any language: a short branch, a commit per logical change, a pull request with the checklist of the coding standards page, and a CI run (DevOps and CI/CD for COBOL) as a required check.
Common mistakes
-
Installing two COBOL language extensions. They compete for the same files and show duplicate or contradictory diagnostics.
-
Typing credentials in a command line or committing them. Use secure fields in the team configuration and the credential store.
-
Assuming the local compiler is the target compiler. A program clean under GnuCOBOL can still fail the Enterprise COBOL compile (and the other way round); build with the target compiler before release.
-
Copying old Zowe v1 commands from a book. Check each command against the generated reference for the version in use.
-
Converting code pages ad hoc. Settle the mapping once and test a round trip of a program that contains every special character in use.