11.04.2013 Views

UniBasic Commands Reference - Rocket Software

UniBasic Commands Reference - Rocket Software

UniBasic Commands Reference - Rocket Software

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

READFWDU<br />

Syntax<br />

READFWDU dyn.array.var [FROM file.var] [ON ERROR statements]<br />

[LOCKED statements] {THEN statements [END] | ELSE statements [END]}<br />

READFWDU dyn.array.var [FROM file.var] [LOCKED statements]<br />

[ON ERROR statements] {THEN statements [END] | ELSE statements [END]}<br />

Description<br />

The first READFWDU command retrieves the alternate key set by SETINDEX, and<br />

then each subsequent READFWDU retrieves the next alternate key value in the<br />

index. UniData reads the corresponding record into a dynamic array, and then assigns<br />

the record ID to the @ID variable. READFWDU checks for locks. If the record is<br />

available, READFWDU sets an exclusive (U) lock before reading the record.<br />

Note: <strong>UniBasic</strong> locks are advisory only. For more information, see Developing<br />

<strong>UniBasic</strong> Applications.<br />

Using this command in a loop, a <strong>UniBasic</strong> program retrieves records in ascending<br />

order based on an indexed attribute.<br />

Before executing READFWDU, you must set a pointer to the alternate key value<br />

with the SETINDEX command.<br />

READFWDU sets the STATUS function return value to 10 if <strong>UniBasic</strong> detects a<br />

duplicate alternate index key value and you have executed the ECL command<br />

DUP.STATUS ON during the current work session.<br />

READFWDU 1-617

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

Saved successfully!

Ooh no, something went wrong!