Rational Developer for System z

Editing COBOL text

The COBOL editor provides functions that increases productivity when editing a file.

Selecting words and phrases

Use the following tips for editing text in the COBOL Editor:
  • To select a word, double-click it.
  • To select a quoted phrase, double-click immediately after the open quotation mark or immediately before the close quotation mark.
  • To select a phrase in parentheses or brackets, double-click immediately after the open parenthesis or bracket or immediately before the close parenthesis or bracket.

Tabbing

All Tab key presses are converted into space characters, regardless of the setting defined by the Text Editor preference Insert spaces for tabs. The number of spaces inserted corresponds to the Text Editor preference Displayed tab width. If there is a tab character in a file, it is displayed as a single space, regardless of the Displayed tab width preference.

Custom tab stops can be defined in the Editor preference page for the COBOL editor. The default tab settings for the COBOL Editor tabs are columns 8, 12, 17 and every 4 characters after column 17.

Hyperlinks

Hyperlink detectors, as defined by the Text Editor preferences, allow web or jazz URLs to appear as hyperlinks when you hold down the Ctrl key.

If COBOL Annotations and Tools are enabled, hovering the cursor over a field or paragraph name in the COBOL Editor and holding down the Ctrl key turns the text into a hyperlink. Clicking on the hyperlink opens the declaration in an editor.

Expanding and collapsing divisions

To collapse a COBOL program division, click collapse cobol division. To expand a collapsed division, click expand cobol division. You can preview a collapsed division by hovering the cursor over the expand icon.

Opening hover information

If editor tools are enabled, hovering the cursor over a record, paragraph, section, COPY statement, or preprocessor statement causes the COBOL hover information to display the structure over the highlighted element. You can press F2 to display information for the selected structure. The hover information will contain real-time syntax warnings if any exist. You can also obtain hover information within a displayed hover information window for COPY statements.

Hovering the cursor over the hover information, opens a toolbar at the bottom of the hover window. The toolbar provides for navigating the hover information and open the structure for editing. The toolbar can also contains Open Declaration and Open Perform Hierarchy buttons. The Open Perform Hierarchy button is enabled only when the element is a paragraph or section language element. If the record has a warning or error annotation associated with it, the annotation text is displayed in the hover information.

Showing range of code structure

If the Show range indicator preference is enabled, when the cursor is place on a line of code, the range of the code structure is indicated by a vertical ruler on the left side of the editor. The Show range indicator preference is part of the General preferences for editors.

Quick fixes

If the editor tools are enabled, suggested changes are provided to resolve a warning or error annotation in the editor.


Feedback