If you specify DISCARD, you must qualify the rows that
you want to discard by specifying FROM TABLE with the WHEN option.
About this task
Records that meet the specified WHEN conditions are then discarded during the REORG
TABLESPACE UNLOAD CONTINUE or UNLOAD PAUSE. For additional information about using the DISCARD
option, refer to the Db2 Utility Guide for your version of Db2.
Procedure
On the Reorg Utility Profile Options panel,
enter Y in the Discard Include field to include the
Discard options.
Enter Y in the Update field for the
Discard option and press Enter.
An ISPF edit session appears in which you can enter the FROM TABLE...WHEN syntax. The
first time you create a utility profile that specifies DISCARD, the text appears as follows:
Edit the text to fit your needs. The discard text must specify the table name(s) and the WHEN
clauses that describe the rows to discard. In addition, the discard text must be preceded by a
comment that includes the database name and table space name.
The layout of the comment statement is as follows:
-- ---------------------------------- KEYWORD DATABASE: IS REQUIRED
-- | ------------------------ DATABASE NAME
-- | | --------------- KEYWORD TABLESPACE: IS REQUIRED
-- | | | --- TABLESPACE NAME
-- | | | |
-- V V V V
-- DATABASE: MYDATABS TABLESPACE: MYSPACE2
The
comment describing the database and table space must be formatted as follows:
The keyword DATABASE must begin in column 4.
Your database name must begin in column 14.
The keyword TABLESPACE must begin in column 23.
Your table space name must begin in column 35.
The remainder of the text (the FROM TABLE and WHEN clauses) must be entered per SQL statement
syntax rules. Be sure to remove extra sample statements from the text before exiting the edit
session.
Note: The discard text is not validated by Db2 Automation Expert.
When you are finished updating the discard text, press PF3 (END).