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.

Example<br />

In the following example, the program segment sets the index to the first record that<br />

contains Smith, and then reads that record and the previous four:<br />

OPEN 'CLIENTS' TO tmp ELSE STOP<br />

SETINDEX 'LNAME', 'Smith' ON tmp<br />

FOR X = 1 TO 5<br />

READBCK rec FROM tmp THEN PRINT rec:", ":rec:" ":rec<br />

ELSE STOP<br />

NEXT X<br />

END<br />

The preceding program produces the following results:<br />

Marge, Smith Smith Widgets<br />

Pearl, Sloane Harvard Assoc.<br />

Reginald, Sklar Culver Excavating<br />

Alexandria, Singleton Vintech Inc.<br />

Larry, Singh Smith Widgets<br />

Note: This program reads the records even if the records are locked by another user.<br />

Related <strong>Commands</strong><br />

<strong>UniBasic</strong><br />

READBCKL, READBCKU, READFWD, READFWDL, READFWDU,<br />

READXBCK, READXFWD, SELECTINDEX, SETINDEX<br />

UniData<br />

BUILD.INDEX, CREATE.INDEX, DUP.STATUS – For information, see the<br />

UniData <strong>Commands</strong> <strong>Reference</strong>.<br />

READBCK 1-601

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

Saved successfully!

Ooh no, something went wrong!