Workbench JCL editor
Workbench JCL Editor is an available option for editing, browsing, and opening actions for files with extensions such as .jcl. It provides colorization for language syntax, an outline view to assist navigation through the code, and other functionality that is customized via preference settings.
To find a text string or EBCDIC hex characters
The editor supports the default Eclipse functionality for finding text. In addition, users can find EBCDIC hex and all occurrences of a text string or EBCDIC hex characters, as described below.
In the editor, do any of the following:
- Click CTRL+F.
- Highlight the desired search text in the editor and click CTRL+F.
- From the Edit menu, select Find/Replace.
The Find/Replace dialog box appears.
- Do any of the following:
- To find a text string, in the Type box, select String.
- To find all occurrences of a text string, in the Type box, select String, then select the Find all occurrences check box.
- To find EBCDIC hex characters, in the Type box, select EBCDIC hex.
- To find all occurrences of EBCDIC hex characters, in the Type box, select EBCDIC hex, then select the Find all occurrences check box.
- Complete the remainder of the dialog box as desired.
- Click Find.
- When searching for all occurrences, the matches are highlighted in the editor and the Search view shows the results. Refer to the Eclipse documentation for information about the Search view.
- When searching for EBCDIC hex characters, the matches (whether in the Search view or the editor) show the UTF display value based on the currently selected code page. For example, searching for F1F2F3F4F5 finds 12345 when using code page 1047 in the editor.
To use the outline view
- If the Outline view is not already open, from the Window menu, select Show View>Outline. The Outline view displays an outline of the structural elements in the file that is open in the editor.
- To position the cursor at a given structural element, click the element in the Outline view.
To select a block of code
Toggle Block Selection functionality allows users to select a block of code and then copy it, delete it, or replace it.
- Do one of the following:
- Right-click in the editor and select Toggle Block Selection.
- Within the editor, press Alt+Shift+A.
- Drag the crosshairs to select the desired code.
- Do any of the following:
- To delete the code, click Delete.
- To copy the code, press Ctrl+C. To paste it elsewhere, place the cursor in the new position and press Ctrl+V.
- To replace the code, begin typing
To use templates
Templates can be used from within the Workbench JCL Editor or from the Templates view.
From the editor
- In the editor, place the cursor where the template should be inserted within the JCL:
- To list all defined templates, place the cursor after a space
- To list templates that match a keyword, place the cursor immediately after the keyword
- To filter the list of templates to those that match typed text, enter the filter text and place the cursor at the end of the desired text
- Press Ctrl+Space. The list of templates appears.
- Select the template to use and press Enter. The template is inserted into the program at the insertion point.
From the Templates view
- From the Window menu, select Show View>Other>General>Templates. The Templates view appears.
- In the editor, position the JCL at the desired line.
- In the Templates view, right-click the desired template and select Insert. One of the following occurs:
- The template is inserted into the program at the insertion point
- If there is input for the selected template, the Input Assistance dialog box appears. Complete the dialog box and click OK. The template is inserted into the program at the insertion point.
Refer to the information below on setting template preferences. Refer to the Eclipse documentation for more information about templates.
To change the case of the selected text
- Select the desired text in the editor.
- Right-click the text and do either of the following:
- To change the text to uppercase, select Source>To Upper Case.
- To change the text to lowercase, select Source>To Lower Case.
To view, edit, and insert a character using hex
The editors allow users to view the value of a non-displayable character, edit a character using hex, and insert a character using hex.
- In the editor, do any of the following:
- To view the value of a non-displayable character, highlight the character (represented by ), right-click, and select Source>Edit Character using Hex. The Edit Character dialog box appears and the EBCDIC hex value field shows the hex value of the non-displayable character. To change the character, enter its EBCDIC hex value.
- To edit a character using hex, select the character, right-click, and select Source>Edit Character using Hex. The Edit Character dialog box appears. Enter the desired value in the EBCDIC hex value field.
- To insert a character using hex, place the cursor in the desired location, right-click, and select Source>Insert Character using Hex. The Insert Character dialog box appears. Enter the desired value in the EBCDIC hex value field.
- Click OK.
To edit a single line using hex
The allows users to edit a single line of characters, including non-displayable characters, using a vertical hex editor.
In the Workbench editor, select the desired line, click
or right-click, and select Source>Toggle Hex Line Editor. The hex line editor appears and shows the hex value of the non-displayable characters in a four-line hex display. The first line shows the readable characters; the second, and third rows show the vertical EBCDIC hex value of each character. When logged in with a code page supporting double-byte characters, the fourth line displays the ideogram for any double-byte characters in the text. The fourth line cannot be used for editing.
- In the hex line editor, use the arrow keys or mouse to select the character to change in either the first line (readable text) or the hex value rows, then enter the new value. To append characters to the end of the line, continue entering data when the cursor is at the end of the line.
To comment out/uncomment selected lines of code
- Select the desired lines.
- Right-click and select Source>Toggle Comment. The selected lines are commented out or uncommented, depending on their original state.
To add or remove bookmarks or tasks
The editor supports the default Eclipse functionality for adding and removing bookmarks and tasks. However, markers only persist for files stored in projects, not those opened from Host Explorer. When a marker is added or the editor is closed, a warning message notifies users that the markers will be deleted. This warning can be customized as described below.
Do either of the following:
- To disable the warning message, click the Don't show this warning again check box on the warning message.
- To re-enable the warning message, from the Window menu, select Preferences. Toggle open the node and select Editors. Select the Show warning when adding bookmarks and tasks outside of projects check box..
To delete text in the program identification area
The contents of the editor's columns 73-80 (the program identification area) can be quickly and easily deleted.
- In the editor, right-click and select Source>Denumber. The Denumber dialog box appears.
- Do either of the following:
- To clear fields that contain only numbers, select Clear numeric fields only.
- To clear all fields, select Clear all fields.
- Click Denumber. The applicable text is deleted from the source file.
To set general preferences
- From the Window menu, select Preferences. The Preferences dialog box appears.
- Toggle open the node, toggle open the Editors node, and select JCL. The JCL preferences page appears.
- Select the General tab.
- Do any of the following:
- To set general text editor preferences, click Text Editors. The Text Editors page appears. Make any desired changes and click OK.
- To change the font properties used in the editor, click Colors and Fonts. The Colors and Font page appears. Make any desired changes and click OK.
- To set the tab width used in the editor, enter the desired tab width in the Displayed tab width field.
- To highlight the current line in the editor, select the Highlight current line check box.
- To type in all capital letters, select the Type in ALL CAPS check box. While in the editor, pressing Ctrl+Shift+Z toggles the option.
in the status bar indicates that the preference is on; a grayed-out icon indicates that it is off.
- To make the print margin visible in the editor window, select the Show print margin check box and enter in the Print margin column field the column number for the start of the print margin.
- To set the number of levels an outline is expanded to when opened in the editor, enter the desired level in the Outline default expansion level field.
- Click OK.
To set template preferences
Templates allow users to quickly insert frequently used blocks of code. The Templates preferences page is used to view a list of available templates, information about those templates, and a visual representation of the template. It also allows users to create, edit, remove, import, and export templates. The following describes the fields on the dialog boxes used in these processes:
- Name: The name given to the template.
- Context list: A list of the available contexts.
- Automatically insert check box: This allows the template to be automatically inserted when it is the only available proposal available at the position.
- Description: A short description of the template.
- Preview: Shows a visual representation of the template.
- Insert Variable: This functionality is not currently supported for JCL templates.
- From the Window menu, select Preferences. The Preferences dialog box appears.
- Toggle open the node, toggle open the Editors node, and toggle open the JCL node.
- Select Templates. The Templates preferences page appears and displays the templates in the current workspace.
- Do any of the following:
- To disable a template from appearing in any list of available templates (in the editor or in the Templates view), clear the check box in front of the template.
- To create a new template, click New. Complete the New Template dialog box according to the definitions above and click OK. The new template is added to the table on the Templates preferences page.
- To edit a template, select the template and click Edit. Complete the Edit Template dialog box according to the definitions above and click OK. The edits are reflected in the table on the Templates preferences page.
- To remove a template, select the template and click Remove. The template is removed from the table on the Templates preferences page.
- To restore any BMC-provided templates that were previously removed, click Restore Removed.
- To revert a selected template to its BMC-provided state, click Revert to Default.
- To export selected templates, select the templates and click Export. On the resulting dialog box, select the location for the export and click OK.
- To import templates, click Import. On the resulting dialog box, select the location of previously exported templates and click Open.
- To remove any user-created templates and restore all BMC-provided templates to their default states, click Restore Defaults.
To set color preferences
- From the Window menu, select Preferences. The Preferences dialog box appears.
- Toggle open the BMC node, toggle open the Editors node, and select JCL>Colors. The Colors preferences page appears.
- To change the colors used in the editor, select the item from the list and click Color. The Color dialog box appears. Select the desired color and click OK.
- Click OK.
To set content assist preferences
Content assist offers a pop-up list of choices for completing the JCL code based on the text entered so far. The content assist preferences allow users to set preferences that control content assist behavior.
- From the Window menu, select Preferences. The Preferences dialog box appears.
- Select BMC>Editors>JCL>Content Assist. The Content Assist page of the Preferences dialog box appears.
- Use the Enable auto activation check box to enable or disable the automatic display of the content assist list. By default, content assist is enabled.
- In the Auto activation delay (ms) field, enter the number of milliseconds should wait before presenting the content assist pop-up list of choices.