REXX Code Explanation
Code Explanation is available in two types: chat experience and code selection. By using the chat
experience
feature, seamlessly engage in a conversation with AI, getting quick and accurate answers to questions about
code.
Getting started with REXX Explanation on VS Code
You can generate an explanation for the selected REXX source code. A split editor panel opens on the right of the VS Code window to display the simple or detailed explanation.
- On the VS Code window, in the explorer panel, left-click on a REXX file to open it in the editor panel.
- Select and right-click on the portion of REXX code that
you want to generate an explanation for.
Alternatively, you can double-click the step headers in the outline panel to make automatic step selections in the editor panel.
- Hover over watsonx Code Assistant™ for Z to open the menu.
- Select any one of the explanation types: Simple or Detailed .
For code explanation examples, see REXX examples topic.
Using the Chat Experience feature
- Click the watsonx
Code Assistant extension on the side panel to open
the
Chat Experience
feature. - Start typing
/explain
, press the space button, and then type @. A menu with a list of files opens in the VS Code workspace. - Select the program and press Enter. Code Explanation for the selected file is displayed in the chat window. You can type in follow-on questions in the chat area to seek further responses.
Alternatively with the code open in the VS Code workspace, right-click on the code snippet, and select Generate Detailed Explanation to view code explanation in the chat window. Follow-on questions are not supported for this method.
Getting started with REXX Explanation on Eclipse
-
From the outline view for REXX Editor, routines are enabled for explanations. You can choose to use a context menu or a keyboard shortcut.
-
If you select a routine reference name for explanation, the source code of the routine is explained if it is available in the same source file.
Generate explanations for full REXX files from the Project Explorer and z/OS Explorer views in Eclipse IDEs.
The code explanation procedure for VS Code and Eclipse environments is similar.