11.04.2013 Views

UniBasic Commands Reference - Rocket Software

UniBasic Commands Reference - Rocket Software

UniBasic Commands Reference - Rocket Software

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

SETINDEX<br />

Syntax<br />

SETINDEX index.name.expr [, [rop] key.val.expr [, id.expr]] [ON file.var]<br />

[BUFFER.KEYS {ON | OFF}] [VALIDATE.KEY {ON | OFF}]<br />

Description<br />

The <strong>UniBasic</strong> SETINDEX command sets a pointer to a key in an alternate key index.<br />

Note: The FILEINFO function, specifically FILEINFO(file.var,21), returns the<br />

current alternate key value.<br />

<strong>UniBasic</strong> maintains index.name.expr for READBCK or READFWD, and related<br />

statements. Normally, you should use the following relational (rop) operators:<br />

Before READBCK statements: LT, LE, LAST_ALT_KEY<br />

Before READFWD statements: GT, GE, EQ, FIRST_ALT_KEY,<br />

NULLVAL_ALT_KEY<br />

Note: You can point to only one alternate index at a time. Each time you use<br />

SETINDEX, the current value is reset and the subsequent READFWD/READBCK<br />

statement reads the record associated with the newly selected index.<br />

SETINDEX 1-725

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!