Code Insight Options

The Code Insight functions are intended to facilitate source code creation, especially when working with graphical screens and reports. The code parameter feature displays hints (similar to the tool tips that appear when the mouse hovers over a button on a toolbar) for using certain COBOL verbs. Code completion provides pop-up lists of options to help complete some code statements and internal library routine calls. Code parameters and code completion are available for the following verbs: CALL, PERFORM, READ, WRITE, START, DELETE, REWRITE, OPEN, CLOSE, CHAIN, MODIFY, INQUIRE, DESTROY, and GO. For more information about using these functions, see Using Code Insight Functions.

With code templates, you can create a library of commonly used code paragraphs or sections. This list of templates can be accessed from within the Code Editor using the hotkey Ctrl+J.

You can set Code Insight options using the following procedures:

  1. Select the Code Insight category of the Code Editor options.
  2. Select the Code Completion feature if you want the workbench to display a list of possibilities for completing your code statement.
  3. Select Code Parameters if you want AcuBench to display a pop-up hint that generally describes the function of the verb you have entered.
  4. Use the Code Template text box to define frequently used code as atemplate that can be inserted into your source code with a mouse click. Approximately 20 default templates are available in the workbench. These templates may be modified directly in the dialog’s Code window.
    • Click New to add a new template to the list, then enter the code for the new template in the Code window. You can either paste code from the Code Editor or another source, or type directly into the window.
    • Add a pipe sign (|) in your code to position the cursor when the template is used. If you include multiple pipe signs, the cursor appears at the first pipe sign in the last line of the code template text. Use a double pipe sign to indicate that the following text should be inserted as a comment.
    • You can display the current list of code templates when working in the Code Editor by pressing Ctrl+J or selecting the Edit > Advanced > Code Template command.