AMT Help Files

Indexes

Indexes (known as keys in DataCom tables) provide an efficient means for accessing a DataCom table. To access the index definition screen of DataCom tables in AMT-COBOL Developer:

 

Creating an index

 

Adjusting an index


The following is a description of the index properties:

Property:

Description:

Value:

Name

Name of the index.

<Text>

Description

Description of the index.

<Text>

Sql Name Optional property in which the name of the DataCom index as used in the AMT user database can be set.
If left empty, the name as set in the "Name" property (see above) will be used.
<Text>
DataCom Name Name of the DataCom index for usage in the COBOL code. <Text>
DataCom Id The Id of the DataCom index which is returned in the results. <Text>
Unique index If checked, then AMT-COBOL will enforce that key values created in the index will be unique. Any attempt to create records with non-unique key values will result in a SQL error.

If unchecked, then the index keys can have non-unique values.
Checked | Unchecked
Master index Check to set this index as Master index (key) for the DataCom table. Checked | Unchecked
Native index Check to set this index as the Native index (key) for the DataCom table. Checked | Unchecked
Has Nil Keys Check to enable the indexing of nil values. Checked | Unchecked

Filegroup/ Tablespace

Name of the MS-SQL filegroup or Oracle tablespace, as is defined by the database administrator.

<Text>

Default fill factor

If checked, the index will use the default fill factor that is specified in the application options.

If unchecked, the fill factor for the index will be set according to the value that is specified in the edit box on the right. For more help on determining a suitable value, please refer to the description for the default fill factor setting in the application options screen.

Checked | Unchecked & <Integer>

Keys (panel)

The keys for the index.
Keys can be defined as ascending (ASC) or descending (DSC) sort order.

<Db Field> & <Sort order>

Include Extra Columns (KeyOnly Reads)

(panel)


When performing KeyOnly reads the Columns selected in this panel will also be read beside the Columns of the Index Keys. The Columns selected will be added to the index but will not affect the unique constraints of the index.

Note: Because the Columns are added to the Index a Database Reorganization is needed.

When using an Oracle database, including extra columns on a unique index will create an additional index on the database named: <Tablename>_<indexName>_UNIQUE

<Db Field>



  • Indexes must have at least 1 key, otherwise no object in the generation set will be generated.

    If there is no index on the table that uses the identity field as first key entry, a separate index will automatically created called RECNO_<Tablename>.
  • The identity field is either a table field that has the identity property set or the automatically created LIONRECNO field.

Deleting an element

An element can be removed from the repository by selecting the element definition in the DataCom table and pressing the keyboard 'Delete' key.

 

Generate the application and reorganize the database

After an index is added, adjusted or deleted, a Whole System generate is required, followed by a database reorganize.