Editing JCL text

The JCL Editor provides functions that increase productivity when you edit a file.

Selecting words and phrases

Use the following tips for editing text in the JCL Editor:
  • To select a word, double-click it. The following characters can constitute a word in a JCL file: letters, numbers, underscore (_), hyphen (-), period (.), and ampersand (&). Clicking part of a data set name or parameter selects the entire entity rather than just a single qualifier in the name.
  • 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.

Searching text in file

Use the following methods to search for text in the JCL Editor:
  • Select and right-click the text in the editor, click Search Text in File from the menu.
  • Invoke the Search Text in File (Ctrl+Alt+F) menu action, and type the text to be searched.
Note that the search text is case sensitive.

You can select the Restrict search to columns checkbox and restrict the search within the specified columns. If not enabled, the search will be restricted within columns 1 and 80 by default. If the checkbox is selected, but no value is specified in the Start column or End column, the search range is not restricted.

You can also click Advanced File Search to invoke the default File Search dialog. The search results will be displayed in the Search View.

Tabbing

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

When you press the tab key for the first time on a line, the tab spacing matches the indentation of the previous line.

You can define custom tab stops for the JCL Editor on the Editor preference page. The default tab settings for the JCL Editor are columns 8, 12, 17 and every 4 characters after column 17.

Hyperlinks

Hyperlink detectors, as defined on the General > Editors > Text Editors > Hyperlinking preference page, display elements as hyperlinks when you hold down the Ctrl key. The JCL Editor adds hyperlinks to the following elements:
  • PROC parameter of EXEC statements
  • Data set names and qualified member names in DD statements
  • Include members
To display a hyperlink, hold down the Ctrl key. Click the hyperlink to open the declaration in an editor.

Expanding and collapsing elements

You can expand or collapse the following JCL language elements:
  • DD statements and DD DATA in-stream statements
  • EXEC statements
  • JOB statements
To collapse a JCL language element, click Collapse JCL element. To expand a collapsed element, click Expand JCL element. You can preview a collapsed element by hovering the cursor over the expand icon.

Opening hover information

Hovering the cursor over an INCLUDE statement causes the JCL hover information to display the structure over the highlighted element. You can press F2 to display information for the selected structure. The hover information contains real-time syntax warnings if any exist. You can also obtain hover information in an open hover information window for INCLUDE 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 opening the structure for editing. If the record has a warning or error annotation that is 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 bar on the left side of the editor. To show only the current range of code in the editor, click Show source of selected element only Show Source of Selected Element Only. The Show range indicator preference is on the General > Editors > Text Editors preference page.

Quick fixes

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