Editing data sets

You can open a file and edit the contents using the z/OS® Explorer z/OS perspective. You can edit only text PDS members or text sequential data sets.

About this task

This task explains how to edit a data set.
Important: The data set editor is intended to open only JCL or job log files of relatively small size, such as a few megabytes in size. When a file is downloaded for display in the CICS Explorer®, the file is stored in the Java heap which has a finite size limit. Attempting to download a large file, such as a system dump data set, can result in Java "OutOfMemoryError" messages. In this scenario you should restart CICS Explorer and view the file using ISPF.
When you open a file for editing, z/OS Explorer places a copy of the file in your local workspace, even if the file is already open for editing in TSO. When you save the file, one of two things will happen:
  • If the file is already open in TSO, z/OS Explorer appears to save correctly, but your changes are not saved to the data set.
  • If the file in the data set has changed since z/OS Explorer took the copy, for example, another user has made and saved changes, the file in the data set is overwritten and the other user's changes are lost.

Procedure

In the Data Set view, click the data set you want to open and perform one of the following actions:

Results

The data set opens in the data set editor.

When you first open the file for editing the file opens in the editor view in the workbench edit area. The following screen capture shows an example file containing JCL.

An screen capture showing an example JCL file open in the editor view.

The workbench status bar provides more details about the file. The status bar information for the previous example looks like this:

A screen capture of the status bar showing that the file is writeable, that the editor is in Insert mode, and that the cursor is on line 5 column 20.
showing that the file is writeable, that the editor is in Insert mode, and that the cursor is on line 5 column 20. You can display line numbers in the editor by right-clicking in the gray vertical bar, which is located at the left-side of the view, and then clicking Show Line numbers in the menu. When editing files you must be aware of the cursor position. PDS members have a record length of 80 characters but the editor does not prevent you from entering more than 80 characters in a single line.

When a data set name is referenced, for example: DSN=NBISHOP.CNTL.JCL(OUT), you can hold down the Ctrl key on the keyboard and hover over the text. The text changes to a hyperlink. Clicking the hyperlink opens the data set in another editor.

When you change a file an asterisk is placed in front of the file name in the view tab: A screen capture of the view tab showing an asterisk in front of the file name.. The asterisk indicates that the file contents have changed but have not been saved.

What to do next

You can now edit the file. The following edit actions are available from the workbench Edit menu or the view context menu:

Table 1. Edit menu actions
Name Function Keyboard shortcut
Undo typing Undo the last change in the editor Ctrl + Z
Redo Redo the previous change that was undone Ctrl + Y
Cut Copies the currently selected text or element to the clipboard and removes the element. On elements, the remove is not performed before the clipboard is pasted. Ctrl + X
Copy Copies the currently selected text or elements to the clipboard Ctrl + C
Paste Paste the current content as text to the editor, or as a sibling or child element to the a currently selected element. Ctrl + V
Delete Delete the current text or element selection. Delete key
Find Next Finds the next occurrence of the currently selected text. Ctrl + K
Find Previous Finds the previous occurrence of the currently selected text. Ctrl + Shift + K
Incremental Find Next Starts the incremental find mode. After invocation, enter the search text. As you type the cursor moves to the character position after the cursor position that matches the text you type. The text you type is shown in the status bar. Ctrl + J
Incremental Find Previous Starts the incremental find previous mode. After invocation, enter the search text. As you type the cursor moves to the character position before the cursor position that matches the text you type. Ctrl + Shift + J
Show Tooltip Description Not in use None
Word Completion Proposes word completions for the current string based on all words found in any open editor. Alt + /
Table 2. View context menu actions
Name Function Keyboard shortcut
Undo typing Undo the last change in the editor Ctrl + Z
Revert File Revert the content of the current editor back to the content of the last saved file. Disabled if the editor does not contain unsaved changes.  
Save Save the content of the current editor. Disabled if the editor does not contain unsaved changes. Ctrl + S
Show In Not in use Alt + Shift + W
Cut Copies the currently selected text or element to the clipboard and removes the element. On elements, the remove is not performed before the clipboard is pasted. Ctrl + X
Copy Copies the currently selected text or elements to the clipboard Ctrl + C
Paste Paste the current content as text to the editor, or as a sibling or child element to the a currently selected element. Ctrl + V
Shift Right Increments the level of indentation of the currently select lines.  
Shift Left Decrements the level of indentation of the currently select lines.  

When you have finished editing the file you save your changes by clicking the Save icon on the z/OS Explorer toolbar. You can the close the editor by clicking the X in the editor tab. If you try to close the editor before you have saved any changes, the Save resource dialog is displayed asking whether you want to save the changes or not.