EDIT TABLE
The EDIT TABLE command invokes the QMF Table Editor. During a Table Editor session, you can make additions, changes, or deletions to records in your table using fields on the panels provided.
TSO with ISPF | TSO without ISPF | CICS® |
---|---|---|
X | X | * |
Description
- tablename
- The name of a table in the database.
If the object name is too long to fit on the QMF command line, issue the command from a command prompt panel. The name does not need to be delimited by quotation marks when continued on multiple lines on the panel.
- MODE
- The type of Table Editor session to run.
- CHANGE
- Operates the Table Editor in a mode permitting rows in the table to be changed. Change mode
includes the ability to:
- Search for rows
- View data in a row
- Update columns in a row
- Delete a row
- Advance through a set of rows
- ADD
- Operates the Table Editor in a mode permitting new records to be added to the table.
- SAVE
- Specifies when to commit changes and deletions made during a Table
Editor session.
- IMMEDIATE
- Changes made during the edit session are processed individually for each row. This choice increases the availability of the table to other users while your edit session is active.
- END
- All changes made during the edit session are held until the session ends. You have an opportunity to cancel all changes at any time. This choice decreases the availability of the table to other users as your edit session progresses.
- CONFIRM
- Indicates whether confirmation panels are displayed during the
Table Editor session. There are confirmation panels for these session events:
- Adding a row
- Changing a row
- Deleting a row
- Typed entries about to be lost
- Session end
Usage notes
- You cannot use the Table Editor to edit a table containing BINARY, VARBINARY, BLOB, or XML data. If the table contains columns with CLOB or DBCLOB data types, those columns cannot be changed, but other columns in the table can be edited. To edit a table that contains DECFLOAT data, the processor on which QMF is running must support decimal floating-point instructions.
- If global variable DSQCP_RMV_BLANKS is set to 1, the Table Editor strips out trailing blanks in CHANGE mode for VARCHAR or VARGRAPHIC columns. If a VARCHAR or VARGRAPHIC column contains only blanks after updating, the length of this column will be zero.
- QMF provides a set of global variables to individually control the activation of the various edit session confirmation panels.
- The Table Editor supports null and default values with specially reserved characters. You can alter the definition of these reserved characters prior to the edit session by changing the values of global variables.
-
When you issue an EDIT TABLE command that references an unqualified table or view name, QMF sends the unqualified name to Db2® for resolution. Db2 uses the value in the CURRENT SCHEMA register to qualify the table or view name. QMF allows you to set the value of this register using the SET CURRENT SCHEMA statement.
- You cannot use the Table Editor in change mode to edit a table that contains a column name longer than 30 bytes. For more information see, https://www.ibm.com/docs/en/qmf/13.1.0?topic=database-support-long-db2-column-names in the Installing and managing Db2® QMF for TSO and CICS guide.
Examples
- To display a prompt panel for the QMF EDIT
TABLE command:
EDIT TABLE ?
- To add new rows to a table named TABTWO owned by user BILL:
EDIT TABLE BILL.TABTWO (MODE=ADD