~~draft~~
September 1, 1989
HOW TO CREATE DB2 TABLES
Procedure to create DB2 tables in your database: 1. Obtain authorization to use a database. Database = __________________. (This is done by written request to Technical Support). The following steps are executed in SPUFI (option DB2.1.1). You also need to create a member in your PDS (ADM.TR16101.TCNTL0XX) to execute the following. 2. Create the tablespace. Input: ADM.TR16101.TWEBSSQL (tablespace name) Your database Your database Leave as is Leave as is Leave as is Use ANY Leave as is Leave as is
CREATE TABLESPACE tablespace name IN TRT171XX USING STOGROUP TRT171XX PRIQTY 0000016 SECQTY 000004 ERASE NO LOCKSIZE ANY BUFFERPOOL BPO CLOSE NO; 3. Define the table. Input:
ADM.TR16101.TWEBSSQL (tablespace name)
CREATE TABLE table name ( column name picture NOT NULL WITH DEFAULT, column name picture NOT NULL WITH DEFAULT, column name picture NOT NULL WITH DEFAULT, ... ... ... column name picture NOT NULL WITH DEFAULT ) IN TRT171XX.tablespace name ; Your database
4. Create the index. Input: ADM.TR16101.TWEBISQL (indexspace name)
CREATE UNIQUE INDEX indexspace name ON table name ( column name ASC ) USING STOGROUP TRT171XX Your database PRIQTY 0000016 Leave as is SECQTY 000004 Leave as is ERASE NO Leave as is SUBPAGES 16 Leave as is BUFFERPOOL BP0 Leave as is CLOSE NO ; Leave as is