9.179 REBUILD_TABLE_INDEX
Clears and rebuilds the high speed index entries associated with file definition(s) that are flagged as high speed tables. Refer to the Database File Attributes section in the LANSA for i User Guide for more information about IBM i high speed tables.
Arguments
No | Type | Req/ Opt | Description | Min Len | Max Len | Min Dec | Max Dec |
|---|---|---|---|---|---|---|---|
1 | A | Req | A literal or variable that specifies or contains the name of the file. The name may be special value "*ALL", a full name, or a generic name | 1 | 10 |
Return Values
No | Type | Req/ Opt | Description | Min Len | Max Len | Min Dec | Max Dec |
|---|---|---|---|---|---|---|---|
1 | A | Req | Return Code. Returned values possible are: OK: Rebuild(s) all completed normally. ER: One or more rebuild(s) encountered an error. NR: No files flagged as high speed tables found matching the name supplied. | 2 | 2 |
Examples
Rebuild the index of a file called STATES:
USE BUILTIN(REBUILD_TABLE_INDEX) WITH_ARGS('STATES') TO_GET(#RETURNVAL)Rebuild the index of all files that start with S:
USE BUILTIN(REBUILD_TABLE_INDEX) WITH_ARGS('S') TO_GET(#RETURNVAL)Delete the user index area and completely rebuild it:
EXEC_OS400 COMMAND('DLTUSRIDX DC@TBLIDX')
USE BUILTIN(REBUILD_TABLE_INDEX) WITH_ARGS('''*ALL''') TO_GET(#RETURNVAL)