JCL Code Explanation

2.1+
You can generate an explanation of a selection of a JCL step. A split editor panel opens on the right of the VS Code window to display the simple or detailed explanation.
  • Simple: A simple summary explanation provides the business purpose and a high-level summary of code function.
  • Detailed: A detailed explanation provides the business purpose, the inputs, outputs, and key data records, as well as a detailed functional summary of code function.
2.3+For JCL, back-end service is enhanced to provide improved explanations for a broader range of z/OS programs.
Notes:
  • JCL code explanation is not supported on-prem.
  • Code explanation is currently only supported for steps that contain EXEC PGM=<IDENTIFIER>.

Getting started with JCL Explanation on VS Code

Complete these steps to get started with JCL explanation.
  1. Left-click on a JCL file in the explorer panel on the left of the VS Code window to open it in the editor panel.
  2. Select the portion of the JCL step you want to generate an explanation for and right-click on the selection.

    Alternatively, you can double-click the step headers in the outline panel to make automatic step selections in the editor panel.

  3. Hover over watsonx Code Assistant™ for Z to open the menu.
  4. Select a Simple or Detailed explanation type.

For code explanation examples, see JCL examples topic.

Using the Chat Explain feature

2.4+
  1. Click the watsonx Code Assistant extension on the side panel to open the Chat Explain feature.
  2. Select the portion of the JCL step you want to generate an explanation for and right-click on the selection. You can also choose to double-click the step headers in the outline panel to make automatic step selections in the editor panel.
  3. Select the program and hit Enter.

Alternatively with the code open in the VS Code workspace, right-click and select an option to view code explanation in the chat window. Follow-on questions are not supported for this method.

Getting started with JCL Explanation on Eclipse

2.3+
When used with IBM® Developer for z/OS® or z/OS Explorer, these features are available.
  • From the outline view for JCL Editor, EXEC steps are enabled for explanations. You can choose to use a context menu or a keyboard shortcut.

  • If you select part of an EXEC step in the JCL Editor, your selection is expanded to select the entire EXEC step.

  • If you fail to select part of an EXEC step you get an error dialog explaining to you that only a single EXEC steps can be selected for explanation.

The procedure for code explanation is mostly the same for both VS Code and Eclipse environments.