Editing text files in Scratchpad
To edit a file
- To open the text file in the Scratchpad perspective, perform one of the following actions:
- In the Scratchpad perspective, open an existing file displayed under Files.
- To create a new command file, add a new file view by clicking
. Then, on the Command Text tab in Scratchpad, enter the command text (either by typing it or pasting copied text).
- Select an object or group of objects in the Db2 navigation perspective, and select one of the Commands options, such as DDL.
- Double-click a data set in the File Locator perspective.
On the Scratchpad's Command Text tab, edit the command as needed:
Purpose
Action
Find a search string
- Click Find/Replace
- Enter the search string in the Search box.
- Click Find.
Find and replace a search string
- Click Find/Replace
.
- Enter the search string in the Search box.
- Enter the replacement string in the Replace box.
- Click Find.
- Click Replace.
Find and replace all instances of a search string
- Click Find/Replace
.
- Enter the search string in the Search box.
- Enter the replacement string in the Replace box.
- Click Replace All.
Make a search case sensitive
Select the Match case check box.
Enable syntax highlighting
Select Use syntax highlighting.
This option is available when the Command Center option is enabled.
For more information, see Setting Command Center options.
Undo an action
Click
to undo the last action.
Redo an action
Click
to cancel undoing the last action.
Copy an existing file
- Browse to a data set and open an existing file.
- Click Copy File
.
Save the file.
Follow the instructions in Step 4.
To remove a file view from the Scratchpad navigation pane, select the file view and click Remove file view
.
- Click Find/Replace
To save the active edited command output, click Save File
in the toolbar.
Under Files in the navigation pane, Scratchpad automatically displays all files that are saved to the mainframe.
- Select a z/OS data set in which to save the file.
- Click Add filter
.
- In the Filter Pattern box, enter a filter (the wildcard * is supported) to display a filtered list of data sets that includes the one you want.
- Click OK.
- In the displayed hierarchical tree, navigate to and select the data set that you want. If you select an archived data set, you will be asked to confirm that you want to restore that data set.
- Click Add filter
- Enter a file name.
- Click Save.