Getting started with the COBOL Editor
To open a file in the COBOL Editor, select the file and click
.The COBOL Editor is associated with the following file extensions: .cbl, .cob, .ccp, .cpy, and .sqb. This editor shares common behavior with the Eclipse language editors, but also provides language-specific enhancements such as syntax highlighting, refactoring, and source actions. To set the COBOL Editor as the default editor for COBOL file types, open the Preferences window and click . When you make this association, you can double-click a file to open it in the COBOL Editor.
- If you open an MVS file that is locked on the MVS Files subsystem, the editor opens it in read-only mode and issues a locked file warning. A file might be locked because it is already open by another user or process.
- If an MVS file contains characters that cannot be correctly converted from one encoding (code page) to another and then back to the original encoding, the file is opened in read-only mode and the characters that cannot be converted correctly are highlighted.
- If the Browse action is used to open the file.
Customizing the editor
To customize the COBOL Editor to suit your preference, see Setting COBOL Editor preferences.
Editing toolbar
You can control several aspects of the appearance of files in the editor by using the editing toolbar:
Toggle Block Selection Mode enables block selection of text. Enabling block selection changes the editor font to a fixed-width font.
Show Whitespace Characters displays a small dot for white-space characters and a paragraph mark for end-of-line markers.
Toggle Mark Occurrences highlights all occurrences of the selected element in the editor.
Toggle Hex Editing displays the currently selected text element in hexadecimal characters at the bottom of the editor page. The hexadecimal text can be modified.
Show Source of Selected Element Only displays only the current highlighted range of code.
Shortcut keys
The list of available key bindings in Eclipse depends on many factors, including what view or
editor is selected, whether a window is open, what plug-ins are installed, and what operating and
windowing system is being used. To obtain a list of available key bindings at any time, click
+Shift+L (on macOS).
Status bar
- The read/write indicator displays Writable or Read-Only.
- The edit mode indicator displays Insert or "Overwrite".
- The line:column indicator displays the line and column position of the edit cursor.
- The toolbox icon displays the status of tooling.
indicates that tooling is enabled. All COBOL Editor functions are enabled.
indicates that tooling is disabled. These functions can be disabled by user preference, because a file is unavailable, or because of an invalid file extension. Tooling is not available for copybooks (that is, files with a .cpy extension). The following COBOL Editor functions are unavailable when tooling is disabled: hover information, Refactor actions, Open Declaration, Open Perform Hierarchy.
indicates that tooling is out of sync because of a syntax error in the file. This warning is displayed when syntax errors are introduced into an open file. This warning icon is subject to change frequently as you edit a file. The following COBOL Editor functions are unavailable or have limited function: hover information data might be out of sync; Refactor actions are unavailable; Open Declaration might work, but the location you jump to might be out-of-sync; Open Perform Hierarchy is unavailable.
indicates that tooling is still initializing or failed to initialize because of a syntax error. This error occurs when a file that contains syntax errors is opened. The following COBOL Editor functions are unavailable: hover information, Refactor actions, Open Declaration, Open Perform Hierarchy.