Making JCL code changes
In addition to COBOL, PL/I, REXX, and High Level Assembler (HLASM), IBM Z® Open Editor supports z/OS MVS JCL editing. You can use the following features to edit JCL programs effectively.
With the syntax highlighting capability, you can quickly distinguish the comments, job, step (exec) and DD statements in a JCL program.
The editor provides the following features and capabilities:
Browsing code by using the Outline view
As you view the source, you can use the Outline view to efficiently explore and navigate the code of the program. By looking through the items in this view, you can see the Jobs, Steps, DD statements and directly navigate to one by selecting it.

How to use it
You can use the Outline view only after you have opened a file or program. If the Outline view is not already expanded, you can open it by clicking View > Open view > Outline.
You can use this view to:
- Recognize internal routines quickly via the icons in the outline view.
- Go to a wanted location in the code by clicking the section header in the view.
- Sort by Position or Name.
- Search for identifiers within the outline by pressing Ctrl+Shift+O (Windows), or Cmd+Shift+O (Mac) within the Editor window.
- Select the entire step/job/DD statement by double clicking on the symbol in the outline view.
When you move your cursor over the program, outline nodes are automatically selected. To toggle this and other features related to the Outline View, hover over the upper right corner of the Outline View. You can see the option ..., where you can click to find multiple options to organize your outline view such as Follow on Cursor, Filter by Type and Sort by Name, Position, and Type.
Previewing include files and PROCs
You can preview the contents of an include file by moving your mouse cursor over the include file name in an INCLUDE MEMBER statement, without having to navigate away from the file you are working in. To open the file in a separate editor, press Ctrl+Click (Windows) or Cmd+Click (Mac).

The editor can load PROCs from z/OS using the current default Zowe profile and display their contents in hovers, including from SYS1.PROCLIB. Note that automatic retrieval from SYS1.PROCLIB must be enabled in the user settings and an MVS PROCLIB must be present in the ZAPP file. The setting zopeneditor.jcl.enableResolvingProcs is disabled (set to false) by default to prevent unnecessary traffic with z/OS.
Expand source code
In addition to reviewing include file content in a hover, you can also create an expanded version of your JCL file that shows how the file is included and expanded.
How to use it
In the editor right-click to open the context menu and select Expand source code. This opens a new read-only editor tab that shows the file with all include files embedded and expanded.
On-hover data set name resolution
You can preview the dereferenced value of a data set when hovering over the DSN statement. The SET values in the file are used to dereference the data set name.

Syntax checking
The syntax checking feature underlines unrecognized statements and expressions in red. This helps you to make quick corrections and reduce compile errors.
How to use it
- To view all syntax errors in the open files, open the Problems view through the View menu or by clicking the error and warning icon in the status bar.
- Double-click a list item to directly go to the problem.
Code completion
The code completion feature suggests simple symbols, constant symbols, jobs, steps, DD statements, keyword instructions, and built-in functions. The editor applies a suggestion to the file based on the context of the cursor position.
- For a cursor position inside a stem, the suggestion replaces the entire symbol.
- For a cursor position inside the tail of a compound symbol, the suggestion replaces a segment of the symbol.
- The casing of the suggestion replaces the casing of the symbol in the file.
- Code completion suggestions are not filtered by case.

How to use it
Code completion suggestions are displayed automatically while you type outside of any comments or strings.
Applying JCL Quick Fixes
JCL quick fixes is a feature that suggests common code changes that can be applied to issues marked in source code. Current suggestions include corrected keywords.
How to use it
- Open a JCL file in the editor.
- Place the cursor on the line of code that contains the issue. The issue is marked with a red squiggle.
- Press Ctrl+. (Windows) or Cmd+. (Mac) or click the lightbulb that appears to open the Quick Fix menu. The menu displays a list of suggested fixes for the issue.
- Select the fix you want to apply from the menu. The fix is applied to the code, and the issue is resolved.

Commenting and uncommenting JCL code
You can comment out one or multiple selected lines of code or a selected section of code by using the toggle comment function.
How to use it
To toggle comment for one or multiple selected lines of code, press Cmd+/ (Mac) or Ctrl+/ (Windows), or go to Edit > Toggle Line Comment.
To toggle comments for a selected section of code, press Option+Shift+A (Mac) or Alt+Shift+A (Windows), or go to Edit > Toggle Block Comment.
See the following example where we first toggle line comment on a single line, then toggle line comment on multiple selected lines, and finally toggle block comment on a selection:

Undoing and redoing
- Undo changes by pressing Ctrl+Z (Windows) or Cmd+Z (Mac).
- Redo changes by pressing Ctrl+Shift+Z (Windows) or Cmd+Shift+Z (Mac).
JCL Code Folding
Code folding is a feature that lets you show or hide logical sections of JCL source code. This makes it easier to focus on the code you edit. Logical sections of JCL source code include JOB, EXEC, and DD statements.
How to use it
- Fold regions of JCL source code using the folding icons in the gutter between the line numbers and the line start.
- Hover over the gutter and click to fold or unfold regions.
- Use Shift+Click on the folding icon to fold or unfold the region and all nested regions.
- For more detailed information about code folding, refer to the VS Code code folding documentation.

JCL code folding is enabled by default. To disable it, use the setting zopeneditor.jcl.enableCodeFolding.