Limited support BMC provides limited support for this version of the product. As a result, BMC no longer accepts comments in this space. If you encounter problems with the product version or the space, contact BMC Support.BMC recommends upgrading to the latest version of the product. To see documentation for that version, see BMC AMI Command Center for Db2 13.2

Editing text files in Scratchpad


Use the following procedure to edit a text file (such as a command statement) that is opened in Scratchpad.

To edit a file

New console
  1. 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 NW_plus_circle_o.png. 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.
  2. On the Scratchpad's Command Text tab, edit the command as needed:

    Purpose

    Action

    Find a search string

    1. Click Find/Replace NW_lines_search.png
    2. Enter the search string in the Search box.
    3. Click Find.

    Find and replace a search string

    1. Click Find/Replace NW_lines_search.png.
    2. Enter the search string in the Search box.
    3. Enter the replacement string in the Replace box.
    4. Click Find.
    5. Click Replace.

    Find and replace all instances of a search string

    1. Click Find/Replace NW_lines_search.png.
    2. Enter the search string in the Search box.
    3. Enter the replacement string in the Replace box.
    4. Click Replace All .

    Make a search case sensitive

    Select the Match case check box.

    Enable syntax highlighting

    (BMC.DB2.SPE2210)

    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 NW_undo.png to undo the last action.

    Redo an action

    Click NW_share.png to cancel undoing the last action.

    Copy an existing file

    1. Browse to a data set and open an existing file.
    2. Click Copy File NW_files_copy_o.png.
    3. Save the file.

      Follow the instructions in Step 4.

    Note

    To remove a file view from the Scratchpad navigation pane, select the file view and click Remove file view NW_minus_circle_o.png .

  3. To save the active edited command output, click Save File NW_floppy.png in the toolbar.

    Under Files in the navigation pane, Scratchpad automatically displays all files that are saved to the mainframe.

  4. Select a z/OS data set in which to save the file.
    1. Click Add filter NW_plus_circle_o.png .
    2. 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.
    3. Click OK.
    4. 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.
  5. Enter a file name.
  6. Click Save.
Classic console
  1. 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 Add-16.png. Then, in 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 click one of the command options such as DDL
    • Double-click a data set in the File Locator perspective
  2. In the Scratchpad's Command Text tab, edit the command as needed:

    To

    Do this

    Find a search string

    Enter the search string in the Search box and click Find.

    Find and replace a search string

    1. Double-click a data set in the File Locator
    2. Enter the search string in the Search box.
    3. Enter the replacement string in the Replace box.
    4. Click Find.
    5. Click Replace.

    Find and replace all instances of a search string

    1. Enter the search string in the Search box.
    2. Enter the replacement string in the Replace box.
    3. Enable the All checkbox.
    4. Click Replace.

    Make a search case sensitive

    Select the A/a checkbox.

    Undo an action

    Click g_gud_arrow_undo.png to undo the last action.

    Redo an action

    Click g_gud_arrow_redo.png > to cancel undoing the last action.

    Enable the editor to accept Regular expressions

    Select the RegEx checkbox.

    Note

    Scratchpad supports all standard Regular expressions.

    Copy an existing file

    1. Browse to a data set and open an existing file.
    2. Click Copy File SaveAs-24.png.
    3. Save the file.

      Follow the instructions in Step 4.

    Note

    To remove a file view from the Scratchpad navigator pane, select the file view and click Remove File View Delete-16.png .

  3. Save your changes:

    • To save the active edited command output, click Save File g_gud_save.png  in the toolbar.
    • To save multiple open files (for example, you selected and created DDL for several objects simultaneously), click Save all files SaveAll.png  (in the navigation pane) to open a Save dialog box for each file.

      Note

      For each file, you can save to a separate data set or select Don't Save.

    Under Files in the navigation pane, Scratchpad automatically displays all files that are saved to the mainframe.

  4. Select a z/OS data set in which to save the file.
    1. Click Add Data Set Filter.
    2. 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.
    3. 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.
  5. Enter a file name.
  6. Click OK.

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*