Editing Multiple Unrelated Tables
You can browse or edit multiple tables in a single session. The tables do not need to be related. For information on browsing and editing related tables, see Related-Table-Browse-and-Edit-function.
An unlimited number of tables may be opened by repeatedly issuing the BROWSE or EDIT primary commands. These commands are only available in a standard browse or edit session; they are not available in Related Table browse and edit.
See Referential Integrity Errors for information on using this feature to correct referential integrity errors. You can use the EDIT command to add the correct data to the parent table without leaving your edit session.
Using the EDIT Primary Command (from Open Pull-down)
When you execute the EDIT primary command as shown in Using the EDIT Primary Command (from Open Pull-down), the Edit Options window displays (Edit Options Window — After Entering EDIT). In this window you specify the creator and table name and whether to use an existing Edit Criteria data set. It is similar to the Edit Options screen (Edit (or Browse) Options screen), however, it does not include the Specify Edit Options area.
Edit Options Window — After Entering EDIT
Specify Db2 Table Area
Creator
ID of the person who created the table or view you plan to edit. Wildcard characters (*, _, %) are valid. See Wildcard-Characters for more information.
Table Name
Name of the table you want to edit.
Optional Area
Database
Name of the database to which you want to confine your selection list.
Tablespace
Name of the tablespace to which you want to confine your selection list.
Specify Edit Template Information Area
Use Existing Criteria
Enter whether you want to use a previously saved Edit Selection Template data set. Edit Selection Criteria consists of conditions to limit and order column selection and/or row selection based on column values. This field is prefilled with the last saved entry (YES or NO).
NO | Don’t use a previously saved Edit Selection Criteria data set. |
YES | Apply the criteria stored in the data set specified in the Edit Criteria Dataset field. Then you can verify and/or modify the selection criteria in the Edit Selection Template. |
Edit Criteria Dataset
If you specified Yes in the Use Existing Criteria field, you must specify the name of the data set that contains the edit template criteria you want to use. File-AID for Db2 prefills this field with the name of the last specified selection criteria dataset name.
The criteria data set must contain a valid SELECT statement. File-AID for Db2 only uses the first SELECT statement of the data set. If a valid SELECT is missing, or the table name of the SELECT statement does not match the entered name in the above Table Name field, File-AID for Db2 gives an error (see Selection Template Not Prefilled). When File-AID for Db2 processes the SELECT statement to prefill the selection template, it ignores extraneous clauses such as WITH, OPTIMIZE, FOR FETCH, and CURRENT OF.
Member
Specify the member of the data set you want to use. If you leave this field blank or specify an asterisk (*), File-AID for Db2 displays the Member List for the data set. The asterisk (*) is the only valid pattern character.
Viewing Multiple Tables
When viewing multiple tables, the second table displays in a window in the lower half of the screen (see the following figure). A maximum of three windows can be displayed at one time. If you open a fourth table, the first table scrolls off of the display. Each additional table moves up to make room for the next one.
Multiple Unrelated Edit Display
You can only edit one table at a time. The table that can be edited is the active table in the active window. Active windows are highlighted. Non-active windows are protected and appear in blue. You can move between tables using the JUMP primary command, but you cannot move the cursor manually to another table. See Manipulating Multiple Tables for more information on using the JUMP command.
Each window has a title bar consisting of the following information:
- Product name
- Product mode: EDIT or BROWSE
- Fully qualified table name: Location.creator.table
- Window number and total number of windows open. If a window displays: 2 of 6, the 2 indicates that it is the second window opened, and the 6 indicates that six windows are currently open.
- Db2 subsystem identification
Only column headings display in the windows. The second and third heading lines (column type, column length, key descriptions, and underscores) displayed in standard Edit no longer display.
When viewing an active window:
- Column headings for primary keys are highlighted white.
- Column headings for foreign keys are highlighted yellow.
Manipulating Multiple Tables
Use the JUMP primary command to move from window to window. Once you jump to a new window, it becomes active. You can only edit data in an active window. See JUMP-J for command syntax. The following figure shows the command JUMP 1 being issued in the last window. After this command is executed, window 1 displays at the top of the screen and becomes active. Window 4 scrolls off of the display (New Display — After issuing the JUMP Primary Command).
To facilitate jumping to a new table, assign JUMP to a PF key.
Issuing the JUMP Primary Command
New Display — After issuing the JUMP Primary Command
Use the MAX primary command to enlarge a window to full screen size. Use the MIN primary command to reduce the window size and resume multiple table viewing. Once a table is maximized, all windows are maximized when using the JUMP command. Tables remain maximized until you issue the MIN command.
To facilitate sizing tables, assign MIN and MAX to PF keys, or select the commands from the View pull-down menu.
Editing Multiple Tables in Row Mode
Enter the ROW primary command to display the active window in row mode. For further information on editing in row mode, see Row Mode. The following figure shows the ROW primary command being issued. Window 2 in Row Mode shows window 2 in row mode.
Issuing the ROW Primary Command
Window 2 in Row Mode
Related topics