Index Commands and Functions
Commands :
Delete a Tag
DELETE TAG <cOrderName> [IN <xcOrderBagName>]
[, <cOrderName> [IN xcOrderBagName] list>]
Create an index file
INDEX ON <expKey>
[TAG <cOrderName>]
TO <xcOrderBagName>
[FOR <lCondition>] [ALL]
[WHILE <lCondition>]
[NEXT <nNumber>]
[RECORD <nRecord>]
[REST]
[EVAL <bBlock>
[EVERY <nInterval>]
[UNIQUE]
[ASCENDING|DESCENDING]
Rebuild open indexes in the current workarea
REINDEX
[EVAL <lCondition>]
[EVERY <nRecords>]]
Open index file(s) in the current work area
SET INDEX TO [<xcIndex list>]
Set a new controlling index
SET ORDER TO [<nOrder> | [TAG <cOrderName>]
[IN <xcOrderBagName>]]>
Toggle the inclusion of nonunique keys into an index
SET UNIQUE on | OFF | <xlToggle>
Functions :
Close all indexes for the current work area
DBCLEARINDEX() --> NIL
Create an index file
DBCREATEINDEX( <cIndexName>, <cKeyExpr>,
<bKeyExpr>,
[<lUnique>] ) --> NIL
Recreate all active indexes for the current work area
DBREINDEX() --> NIL
Move to the record having the specified key value
DBSEEK( <expKey>, [<lSoftSeek>] ) --> lFound
Open an index for the current work area
DBSETINDEX( <cIndexName> ) --> NIL
DBSETINDEX( <cOrderBagName> ) --> NIL
Set the controlling order for the current work area
DBSETORDER( <nOrderNum> ) --> NIL
Return a descending index key value
DESCEND( <exp> ) --> ValueInverted
Determine if the previous search operation succeeded
FOUND() --> lSuccess
Return the default index extension
INDEXEXT() --> cExtension
Return the key expression of a specified index
INDEXKEY( <nOrder> ) --> cKeyExp
Return the order position of the controlling index
INDEXORD() --> nOrder
Return the default Order Bag RDD extension
ORDBAGEXT() --> cBagExt
Return the Order Bag name of a specific Order
ORDBAGNAME(<nOrder> | <cOrderName>) --> cOrderBagName
Specify conditions for ordering
ORDCOND([FOR <lCondition>]
[ALL] [WHILE <;lCondition>]
[EVAL <bBlock> [EVERY <nInterval>]]
[RECORD <nRecord>] [NEXT <nNumber>]
[REST] [DESCENDING])
Set the condition and scope for an order
ORDCONDSET([<cForCondition>],
[<bForCondition>],
[<lAll>],
[<bWhileCondition>],
[<bEval>],
[<nInterval>],
[<nStart>],
[<nNext>],
[<nRecord>],
[<lRest>],
[<lDescend>],
[<lAdditive>],
[<lCurrent>],
[<lCustom>],
[<lNoOptimize>]) --> lSuccess
Create an Order in an Order Bag
ORDCREATE(<cOrderBagName>,[<cOrderName>], <cExpKey>,
[<bExpKey>], [<lUnique>]) --> NIL
Return and optionally change the descending flag of an order
ORDDESCEND([<cOrder> | <nPosition>],[<cIndexFile>],
[<lNewDescend>]) --> lCurrentDescend
Remove a specified Order from an Order Bag
ORDDESTROY(<cOrderName> [, <cOrderBagName> ]) --> NIL
Return the FOR expression of an Order
ORDFOR(<cOrderName> | <nOrder>
[, <cOrderBagName>]) --> cForExp
Return the status of the unique flag for a given order
ORDISUNIQUE([<cOrder> | <nPosition>],
[<cIndexFile>]) --> lUnique
Return the Key expression of an Order
ORDKEY(<cOrderName> | <nOrder>
[, <cOrderBagName>]) --> cExpKey
Add a key to a custom built order
ORDKEYADD([<cOrder> | <nPosition>],
[<cIndexFile>],[<expKeyValue>]) --> lSuccess
Return the number of keys in an order
ORDKEYCOUNT([<cOrder> | <nPosition>],
[<cIndexFile>]) --> nKeys
Delete a key from a custom built order
ORDKEYDEL([<cOrder> | <nPosition>],
[<cIndexFile>],
[<expKeyValue>]) --> lSuccess
Move to a record specified by its logical record number
ORDKEYGOTO(<nKeyNo>) --> lSuccess
Get the logical record number of the current record
ORDKEYNO([<cOrder> | <nPosition>],
[<cIndexFile>]) --> nKeyNo
Get key value of the current record from controlling order
ORDKEYVAL() --> xKeyValue
Add Order Bag contents or single Order to the Order List
ORDLISTADD(<cOrderBagName>
[, <cOrderName>]) --> NIL
Clear the current Order List
ORDLISTCLEAR() --> NIL
Rebuild all Orders in the Order List of the current work area
ORDLISTREBUILD() --> NIL
Return the name of an Order in the work area
ORDNAME(<nOrder>[,<cOrderBagName>])
--> cOrderName
Return the position of an Order in the current Order List
ORDNUMBER(<cOrderName>[, <cOrderBagName>]) --> nOrderNo
Set or clear the boundaries for scoping key values
ORDSCOPE(<nScope>, [<expNewValue>]) --> uCurrentValue
Set focus to an Order in an Order List
ORDSETFOCUS([<cOrderName> | <nOrder>]
[,<cOrderBagName>]) --> cPrevOrderNameInFocus
Relate a specified work area to the current work area
ORDSETRELATION(<nArea> | <cAlias>,<bKey>, [<cKey>])
--> NIL
Move record pointer to the next or previous unique key
ORDSKIPUNIQUE([<nDirection>]) –> lSuccess