-- Online Reorg Mapping Table Space, Table and Index Definition -- Replicate table and index definition for each of the associated -- Db2 table to be Online Reorged -- All mapping tables can be defined in the same Table Space CREATE TABLESPACE {tsname} IN {dbname} USING STOGROUP {sgname} PRIQTY 720 SECQTY 720 ERASE NO FREEPAGE 0 PCTFREE 10 COMPRESS NO GBPCACHE CHANGED SEGSIZE 4 BUFFERPOOL BP0 LOCKSIZE ANY LOCKMAX SYSTEM CLOSE YES CCSID EBCDIC MAXROWS 255 ; COMMIT; SET CURRENT SQLID = '{creator}'; CREATE TABLE "{creator}"."{tbname}_MAP" ( "TYPE" CHAR(1) NOT NULL ,"SOURCE_RID" CHAR(5) NOT NULL ,"TARGET_XRID" CHAR(9) NOT NULL ,"LRSN" CHAR(6) NOT NULL ) IN {dbname}.{tsname} AUDIT NONE DATA CAPTURE NONE CCSID EBCDIC NOT VOLATILE CARDINALITY ; COMMIT; CREATE TYPE 2 UNIQUE INDEX "{creator}"."{tbname}_MAPX" ON "{creator}"."{tbname}_MAP" ( "SOURCE_RID" ASC ,"TYPE" ASC ,"TARGET_XRID" ASC ,"LRSN" ASC ) USING STOGROUP {sgname} PRIQTY 720 SECQTY 72000 ERASE NO FREEPAGE 0 PCTFREE 10 GBPCACHE CHANGED BUFFERPOOL BP0 CLOSE NO PIECESIZE 2097152 K ; COMMIT;