Overview of File Manager® DB2 editor actions

In addition to the basic edit functionality, the File Manager® editor provides a set of actions to improve productivity. These actions are available in the File Manager® menu toolbar, as toolbar items, or directly from the editor's pop-up menu.

The toolbar menu and toolbar items
The File Manager® plug-in DB2 editor pop-up menu

Follow the links for more detailed explanations of the actions.

Switch editor's table Mode
Page Up
Page Down
Page Left
Page Right
Select All
Copy Records
Copy to clipboard
Cut Records
Paste Records
Delete icon Delete Records
Find/Replace
Locate Column
Sort Records
View SQL Error
REDIT
Direct Related Edit for DB2
Hex on/off
Show Options
Exclude Records
Reset Excludes
Save
Insert new records
Switch editor mode
Validate editor contents
Block Copy
Block Paste

Copy to clipboard

This action copies the currently selected records in the editor to a clipboard. The copied records are available for pasting into a desired application like a spreadsheet or a notepad. Note that excluded and shadow lines, are not copied by this action.

This action is equivalent to CTRL + C key combination.

Back to top

Select All

This action selects all the rows in a table and is equivalent to doing CTRL + A key combination.

Copy records

This action copies the records currently selected in the editor. The copied records are available for Paste action. Note that grouped records, such as excluded records, grouped unselected records and grouped suppressed records, are not available for this action. See Show options and Exclude records for more information.

Back to top

Cut records

This action cuts the records currently selected in the editor. This action is the equivalent of performing Copy action followed by Delete action against the currently selected records. Note that grouped records, such as excluded records, grouped not selected records and grouped suppressed records, are not available for this action. See Show options and Exclude records for more information.

Once records are cut, they are removed from the editor for display. However, the records are not removed from the original source unless a Save is performed explicitly.

Back to top

Delete icon Delete records

This action deletes the records currently selected in the editor. A Delete all records checkbox provides the option of deleting the entire contents of the resource. Note that grouped records, such as excluded records, grouped unselected records and grouped suppressed records, are not available for this action. See Show options and Exclude records for more information.

Once records are deleted, they are removed from the editor for display. However, the records are not deleted from the original source unless a Save is performed explicitly.

The delete confirmation dialog allows you to specify an option to delete all records (see below). If you try to execute a delete action without a valid selection in the editor, then this option is selected by default.

Delete records options dialog

Back to top

Exclude records from display

This action temporarily excludes some records from the display for the current edit session. The criteria for excluding records are specified using the Exclude Options dialog shown below.

Exclude Options dialog
Refer to IBM® File Manager® for z/OS®, User's Guide and Reference for a full description of these options.

This action is useful when you are looking for a subset of records currently being displayed in the editor. For example, you can specify Exclude all record options which excludes all records from display (You should get a shadow line which indicates how many records are excluded from display. See Show options for more information.). Subsequently, you can look for records which contains a specific pattern using the Find/Replace action. The Find/Replace action will then cause only the records containing the specific pattern to be displayed, while other records remain hidden.

Back to top

Find/Replace

This action enables you to search for a specific pattern (either by a string literal or hex value) within the currently edited resource. Furthermore, you can issue a replace command which replaces the occurrences of searched patterns with the specified replacement pattern. Find/Replace options are specified using the Find/Replace dialog which is shown in the image below.

Find/Replace dialog

Refer to IBM File Manager® for z/OS, User's Guide and Reference for the full description of these options.

After a Find/Replace command is issued the result is reflected in the editor contents. The image below is a screenshot of File Manager® editor after successfully issuing a Find command to the current edit session (note that fields containing the search pattern are highlighted). The Find/Replace dialog remains active as long as the current edit session is open, so you can interactively specify search commands.

After successful execution of a Replace command, the records are modified in the editor for display. However, the changes to records are not committed to the edited resource until a Save is executed explicitly.

Example of search result

Back to top

Insert new records

This action inserts a specified number of new records into the current edit session. This action is only available in edit sessions and data set types that allow new records to be inserted. The number of new records to insert is specified in the Insert Records dialog.

If you select the Insert records at the top option in the dialog, the specified number of new records will be inserted at the top of the editor. Otherwise, the new records are inserted after the selected record or after the first record from a group of selected records. If no valid selection exists in the editor, then you will be given an option to insert new records at the top.

The records are inserted in the editor for display. However, the records are not saved to the edited resource until a Save is executed explicitly.

Insert dialog

Back to top

Locate column

This action allows you to locate a column in the current edit session. This action is only available when a template is used to format the data and the records are displayed in formatted mode.

When the user invokes the Locate Column action, the Locate Column dialog (image below) is displayed. The user is able to see a list of fields that are available in the currently selected layout of the template in use for the current edit session. Once a field name is selected from the list, the editor tries to adjust the position of the table so that the selected field/column is visible in the editor.

Locate Column dialog

Back to top

Lookup SQL error

This action is only available when you are editing a DB2 object and an error occurred while attempting to commit the changes to the database. To invoke this action, you need to select a row with a SQL error and execute the action (see the image below).

SQL error in the editor
SQL error

When you execute the action, a dialog box is displayed which reports the SQL error code that caused the commit to fail. From the dialog, you can click the Lookup button to retrieve the explanation of the SQL error code (see the image below).

SQL error in the editor
SQL error lookup

Back to top

Display hex lines

This action toggles hex lines on or off.

Back to top

Page down

The File Manager® editor only caches a subset of records locally for display. The number of cached records are controlled in the File Manager® preference page. This allows efficient transfer of data from mainframe to your desktop machine, particularly when you are working with a resource containing a large number of records.

This action moves the cached records forward. That is, it retrieves records which follow the last record cached in the current cache window. This action is equivalent to issuing the DOWN nn command, in that it positions the editor's cursor forward by the specified number of records (nn).

Back to top

Page up

The File Manager® editor only caches a subset of records locally for display. The number of cached records are controlled in the File Manager® preference page. This allows efficient transfer of data from mainframe to your desktop machine, particularly when you are working with a resource containing a large number of records.

This action moves the cached records backward. That is, it retrieves records that precede the first record cached in the current cache window. This action is equivalent to issuing the UP nn command, in that it positions the editor's cursor backward by the specified number of records (nn).

Back to top

Page Left

The File Manager® editor only caches a subset of records locally for display. The number of cached records are controlled in the File Manager® preference page. This allows efficient transfer of data from mainframe to your desktop machine, particularly when you are working with a resource containing a large number of records.

This action moves the cached records to the left. That is, it retrieves records from columns to the left of the current cache window. This action is equivalent to issuing the LEFT nn command, in that it positions the editor's cursor to the left by the specified number of records (nn).

Back to top

Page Right

The File Manager® editor only caches a subset of records locally for display. The number of cached records are controlled in the File Manager® preference page. This allows efficient transfer of data from mainframe to your desktop machine, particularly when you are working with a resource containing a large number of records.

This action moves the cached records to the right. That is, it retrieves data to the right of the current cache window. This action is equivalent to issuing the RIGHT nn command, in that it positions the editor's cursor to the right by the specified number of records (nn).

Back to top

Paste records

This action pastes the copied/cut records into the currently edited resource. This action is only available in an edit session when the resource being edited allows insertion of new records.

If you specify Paste records at the top option in the Paste Records dialog, then the records are inserted at the beginning of the currently edited resource. Otherwise, the records are inserted after the currently selected records in the editor. If no valid selection is available in the editor, then the user is presented with an option to insert records at the beginning of the currently edited resource.

The records are inserted in the editor for display. However, the records are not saved to the edited resource until a Save is explicitly executed.

In the Paste Records dialog, you can specify the number of times the selected records should be pasted into the current edit session (i.e. repeat). The maximum number of repeats is 1000.

Paste records dialog

Back to top

REDIT Command (Related Tables)

This action is only available when you are editing a DB2 object. It opens a list of tables related to the current table being edited (see the image below). From the list of related tables, you can choose a table to edit.

REDIT Dialog
REDIT dialog

To invoke a separate edit session for a related table, select a related table then click on the edit button which is located on the right of the dialog.

Back to top

Direct Related REDIT

This action is only available when you are editing a DB2 object. It can be used to directly view the related table rows based on the keys for the selected DB2 row. For this discussion we will be using the Sample DB2 tables. While editing or viewing the DB2 table DSN81210.EMPPROJACT.

Direct Related Edit Option
Direct Related Edit for DB2

Selecting a DB2 row and then the ‘Direct Related Edit’ option, you will be shown a list of DB2 tables related to DSN81210.EMPPROJACT. See the Related Tables Dialog below.

Related Tables Dialog
Related Tables dialog

By selecting a related table and clicking on the view button or double clicking on a selected row, FM/DB2 will generate an SQL query to show the data in the related DB2 table in a new Editor Session, that matches the keys for the selected DB2 table being edited or viewed. The new editor session being opened is in edit/view mode depending upon the Original editor session's mode from where the Option for Direct Related edit for DB2 for taken. For example, FM/DB2 will generate the following SQL query to return the data from DSN81210.PROJACT where the column name ACTNO matches the ACTNO for the select DB2 row in DSN81210.EMPPROJACT. In this case ACTNO=‘100’. SELECT * FROM DSN81210.PROJACT WHERE ACTNO = '100' .

Related Data Editor Session
Related Data Edit

Reset exclude options

This action resets the current Exclude options. That is, all previously excluded records will be displayed again. See Exclude for more information.

Back to top

Save editor contents

This action saves the modified records, that is, the changes are made to the resource on a permanent basis. This action is only applicable in an edit session and only becomes available when the editor contents are modified.

Back to top

Sort editor contents

This action sorts records based on the specified criteria. The sorting criteria is specified using the Sort record dialog (shown below). For Sort by column number and Sort by field reference, up to five criteria can be specified.

Sort records dialog

For a DB2 edit session, there is only one sorting method:

  1. Sort by field reference: Sort by values in a selected field in ascending/descending order. This sort option is specified using the Sort by field dialog which is shown below. This option is only available when a template or copybook is specified for the current edit session.
Sort by field dialog

Back to top

Specify Show options

This action controls how records are grouped (grouping options) and which should be displayed to the user (shadow line options). These options are specified using the Show and Shadow Lines Options dialog (shown below).

Grouping options

These options control whether similar types of records should be grouped together or not.

Show options

These options control whether a shadow line should be displayed to represent a specific type of grouped record.

Show and Shadow Lines Options dialog

Back to top

Switch editor mode

This action switches between Formatted (table) mode (if a template/copybook is applied) and Character mode.

Back to top

Validate editor contents

This action validates any changes to the currently edited records. If any errors exist, then they are reported to the user. If validation is successful, or if the user chooses to ignore the errors, then the changes are reflected in the edit session. However, changes are not saved to the currently edited resource until a Save is explicitly executed.

Back to top

Switch editor's table mode

This action switches between Formatted (table) mode (if a template/copybook is applied) and Advanced table mode.

Back to top

Block Copy

This action copies the block selection content currently in the editor. Block selection might be continuous or discontinuous selection i.e user can use the SHIFT/CTRL keys to select multiple cells. The copied contents are available for Block Paste action. Note that grouped records, such as excluded records, grouped unselected records and grouped suppressed records, are not available for this action. See Show options and Exclude records for more information.

Back to top

Block Paste

This action pastes the block copied contents into the currently edited resource or another same type resource editor. This action is only available in an edit session when the resource being edited allows insertion of new records.

If you specify Paste records at the top option in the Paste Records dialog, then the records are inserted at the beginning of the currently edited resource. Otherwise, the records are inserted after the currently selected records in the editor. If no valid selection is available in the editor, then the user is presented with an option to insert records at the beginning of the currently edited resource.

The records are inserted in the editor for display. However, the records are not saved to the edited resource until a Save is explicitly executed.

Back to top