Use Zowe to validate JCL with the touch of a button
{Ecosystem} In a companion article titled “CA JCLCheck and Zowe ensure that JCL runs successfully at your site”, I describe how Open Mainframe Project’s Zowe technology has expanded the capabilities of Broadcom’s “CA JCLCheck™ Workload Automation” so that JCLCheck can be accessed through REST requests and by command-line scripting from remote hosts.
REST API programming and command-line scripting are great. You can trigger JCL validation from a custom application, a script on your laptop, or within a CI/CD pipeline. However, some consumers will want on-demand validation of JCL that they are currently editing. Rather than script a command, such users would rather specify some configuration options once, and press a “Go” button whenever they want another check to be performed.
In this article I describe how Broadcom’s “JCL Language Support Visual Studio Code Extension” can be used to create such a work environment.
JCL Language Support Visual Studio Code Extension
This component of Broadcom’s JCL ecosystem is an extension to the popular free Visual Studio Code source code editor. The JCL Language extension is freely available from the Visual Studio Code marketplace. The following article provides an excellent introduction to the capabilities of Broadcom’s JCL Language extension.
Rather than repeat the capabilities from the article above, I will focus on use-cases that are served by the JCL Language extension. I do however, replicate some of the visuals from that article. You should read the article above for an explanation of how a given feature works.
Even if you do not have access to Broadcom’s JCLCheck product, you can gain benefits from the JCL Language extension. Out of the box, the extension provides JCL syntax highlighting and code snippets. Both of these capabilities provide productivity enhancements to a developer writing JCL.
In the past, some developers would download a data set from the mainframe to a local laptop file, edit that file in a preferred editor, and then upload that file back to the mainframe data set. You can eliminate those download and upload steps by installing another free VS Code extension named “Zowe Explorer”. With Zowe Explorer a user can perform a number of mainframe operations. Of particular interest to our JCL topic, is Zowe Explorer’s ability to edit mainframe datasets from your laptop. By having both Zowe Explorer and JCL Language Support, a developer can use syntax highlighting and snippets while editing JCL that resides in a data set on the mainframe.
Integrate with CA JCLCheck
Once the JCL Language extension is configured to work with an installation of CA JCLCheck™ Workload Automation, the value of the JCL Language extension increases tremendously. The configuration involves some Zowe CLI actions to install the JCLCheck plugin and create a JCLCheck profile. Finally, the user turns on a VS Code configuration option named “JCLCheck Features”.
While editing JCL, a user can submit the JCL to the JCLCheck application for validation by selecting the “Check your JCL” option from the VS Code command palette. This is the aforementioned “Go” button. Lines of JCL that contain errors will then be highlighted within the VS Code editor. When the user hovers over a line in error, a tool-tip style message appears containing the error that exists on that line. All of the error messages are also displayed in the “Problems” window of Visual Studio Code. Another configuration option named “Lint On Save” will automatically perform a JCLCheck validation whenever you save the JCL file.
Generating a validation report for your JCL
A fully formatted JCLCheck validation report can be generated by selecting the “Generate Report” option from the VS Code command palette. It produces a report similar to the JCLCheck product’s batch report, but in Markdown format.
A separate Markdown extension exists for VS Code which can automatically display Markdown text as a fully-formatted document in a second VS Code editor tab. This is one reason for selecting Markdown as the report format. A user can generate the report and quickly view the formatted document without ever leaving VS Code.
A second reason for choosing the Markdown format is that 3rd party Markdown conversion tools can be used to convert Markdown text into a PDF file or an HTML file. Such an action might be useful if the JCLCheck user is a Systems Programmer or a DevOPS engineer, who has the role of gatekeeper to a site’s production environment. That person may need to validate JCL and report the results to responsible parties. By converting the report to common formats like PDF or HTML before sending it in an email, recipients are nearly guaranteed to be able to view the report without installing any new tools.
Summary
As with many of the “modernization” efforts within Broadcom, we have leveraged the capabilities of an existing mainframe application. By extending the JCLCheck application’s functionality through REST APIs, command line scripting tools, and the GUI interface of a popular free programming editor, we enable more people, with different responsibilities in their companies to take advantage of JCLCheck’s validation capabilities.
The JCL Language Support Visual Studio Code Extension can be obtained from this location: JCL Language Support on Visual Studio Marketplace