Using Code Insights Explain
To generate summaries of selected code or the entire COBOL program
- In the editor, perform one of these actions:
- For a summary of a snippet of the code, right-click and select Code Insights > Explain Code Selection.
- For a summary of the whole program select Explain Program.
If the selected code snippet contains the PERFORM paragraph, the DevX Code Insights extension includes the paragraph with the code sent to the AI Services APIs for the explanation process and attached to the Code tab.
- If you select a code snippet or program containing more than 20,000 words, then it might take several minutes to explain. In the notification dialog box, click Proceed to continue.
- If you receive a notification that you selected an incomplete code snippet. In the notification dialog box, click Proceed to continue.
- If the selected code has a copy statement and that copybook is not downloaded then see a notification to download copybooks. If you select Download Copybooks, the copybooks will be downloaded, and the explanation process will start. If you do not want to download copybooks then click Skip to proceed or click Cancel to cancel the process.
- In the Code Insights Explain dialog box, you can perform the following tasks:
- Explanation tab: Displays the summary of the code. Click Copy
to copy the summary to the clipboard. If you're not satisfied with the summary you received, click Regenate
to receive a new summary.
- Explanation tab: Displays the summary of the code. Click Copy
- Comment tab: Displays the summary that is converted into a comment for COBOL.
- Click
to copy the comments to the clipboard.
- Click
to paste the comment to the file. You must open the file in edit mode when you use this option.
- Click
to convert the comments to uppercase.
- Click
- Code tab: Displays the selected code to be explained. Click
to copy the code to the clipboard.
Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*