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.

READFWDL<br />

Syntax<br />

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

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

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

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

Description<br />

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

then each subsequent READFWDL 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. READFWDL checks for locks. If the record is<br />

available, it sets a shared (L) lock.<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 READFWDL, you must set a pointer to an alternate key value with<br />

the SETINDEX command. The SETINDEX parameters BUFFER.KEYS and<br />

VALIDATE.KEY determine, respectively, whether the buffering mechanism is used<br />

and whether keys are validated when READFWDL executes. For details, see<br />

SETINDEX.<br />

READFWDL 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 />

READFWDL 1-613

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

Saved successfully!

Ooh no, something went wrong!