Progress/400
Product Guide


Adding an Index

The Progress/400 Data Dictionary allows you to add indexes (regular or word) to an existing DB2/400 file. Once an index is added, you can access it through Progress or AS/400 applications.

When you use the Progress/400 Data Dictionary to add regular (not word) indexes, the first index that you add becomes the Progress primary index. That index also becomes the physical file key on the AS/400, so no object is visible in the DataServer library. Note that if at least one index field is case sensitive, the entire index is case sensitive.

The Progress/400 Data Dictionary does not allow a word index to be a primary index. In addition, before you can create a word index, you must define a primary index.

Follow these steps to add an index:

  1. Choose the Index mode button in the Progress/400 Data Dictionary main window.
  2. Choose Modify schema.
  3. Select the table from the Tables list that will contain the new index.
  4. Choose the Create Index button. The following dialog box appears:
  5. Enter a unique name in the Index Name field.
  6. Press TAB and a name for the AS/400 logical file is supplied for you based on the index name. For example, for an index named ncust-num, the AS/400 logical file name is NCUST_NUM.
  7. Activate the Primary, Unique, Abbreviated, or Word Index check box as required.
  8. If you selected the Word Index check box, enter the word size in the Word Size field. You must specify a value from 10 to 128. This value specifies the length of the longest word that is entered into the text field on which the index is built. A larger value results in a larger index.
  9. NOTE: You can change the word size in the Index Properties dialog box but only before you commit the word index. Once you commit it, you can change the word size only by deleting and re-creating the word index.

  10. Select one or more fields to include in the index, then choose Add.
  11. Choose OK, or choose Create if you want to create another index.

Copyright © 2004 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095