Requesting a Code Explanation

Learn how to use the Code Explanation service to request a Code Explanation.

You can request an explanation of the source code to help you understand what the code is doing. This feature is only available when the IBM® watsonx Code Assistant™ for Z Code Explanation service is enabled. For more information, see Code Explanation.

Requesting an explanation of a key condition from the Project Artifacts view

To request an explanation of a key condition, complete the following steps:
  1. Select a key condition in the Project Artifacts view.
  2. Click the Action Menu icon to the right of the key condition and then select one of the following options.
    • Generate simple explanation provides the business purpose and a high-level summary of the source code.
    • Generate detailed explanation provides the business purpose, inputs, outputs, and key data records, as well as a detailed functional summary of the code.
    • Generate guided explanation provides the business purpose and a step-by-step description of the code.
    After your selection, a read-only source editor opens to display the key condition’s source code. The Z Code Explanation view displays the requested explanation.

Requesting an explanation of an artifact from the Project Artifacts view

To request an explanation of an artifact, complete the following steps:
  1. Ensure that you are signed in and have an active session.
  2. Click the Action Menu icon to the right of a project artifact within the Project Artifacts view.
  3. Select one of the following options:
    • Generate simple explanation provides the business purpose and a high-level summary of the source code.
    • Generate detailed explanation provides the business purpose, inputs, outputs, and key data records, as well as a detailed functional summary of the code.
    • Generate guided explanation provides the business purpose and a step-by-step description of the code.
    After your selection, a read-only source editor opens to display the artifact’s source code. The Z Code Explanation view displays the requested explanation.

Requesting an explanation of a closure graph program node

To request an explanation of a program node, complete the following steps:

  1. Ensure that you are signed in and have an active session.
  2. Click the Action Menu icon on the upper right corner of the program node that is required to explain and then select one of the following options.
    • Generate simple explanation provides the business purpose and a high-level summary of the source code.
    • Generate detailed explanation provides the business purpose, inputs, outputs, and key data records, as well as a detailed functional summary of the code.
    • Generate guided explanation provides the business purpose and a step-by-step description of the code.
    After your selection, the Z Code Explanation view displays the requested explanation.