On IBM i, the only way to build an index over an existing table and have that index be a VECTOR INDEX (must faster than regular indexes) is to create it using SQL.
The SQL statement to create this type of index, is "CREATE ENCODED VECTOR INDEX".
The first parameter is the name of the new index object (similar to a logical file) that is being created.
That index object name is followed by the "ON" keyword which is followed by the table (physical file) name over which the index is built.
Last, you enclose the key fields for the index in parens and separate them with commas.
Here's a simple example:
CREATE ENCODED VECTOR INDEX lgl_view ON phy_table (fld1,fld2,fld3);
In this example, the Vector Index named LGL_VIEW is being created over the file named PHY_TABLE. You would of course modify these names to meet your own needs.
The key fields in this index (there are 3 of them) are FLD1, FLD2 and FLD3. These are obviously made-up names and your own field names would go in place of them.
If processing this SQL statement with the RUNSQLSTM command, then the semicolon is required at the end of the statement. If running this CREATE ENCODED VECTOR INDEX statement in Interactive SQL (i.e., STRSQL) the semicolon is not specified.