When creating an index on a table it's often a good idea to create an index with a name similar to the table name. This is a shortcut way to create an index while using the original table name and not have to actually type in the name or copy from another screen.
CA RC/Query for Db2 for z/os and CA RC/Update for Db2 for z/os must both be available for this procedure to work.
- Starting at the CA RC/Query table(T)/ List (L) screen query the table that you would like to create an index from.
- When you have the list of tables enter the CREATE command next to the table you want to create an index on.
- When on the TABLE CREATE screen change the object field to an I for INDEX : Object => I and press enter and it will change to the INDEX CREATE screen.
- On the Index Create screen the original table name is now in the Index Name field
- COPY the original table name and PASTE into the TABLE NAME field.
- If you wish to, change the index name slightly to reflect that it is an index associated with this table and press enter.
- RC/Update will display "Index Column Selection & Key Maintenance" screen so that an index column or columns can be selected. Select the columns required with an "S" and press enter and then PF3 to return to the INDEX CREATE screen.
- After checking the other index attributes press PF3 to generate the index DDL.
- Execute the DDL by pressing enter.
RC/Query for db2 for z/os, Table Reports
RC/Update for db2 for z/os, Index Create Option