UniBasic Commands Reference - Rocket Software

UniBasic Commands Reference - Rocket Software UniBasic Commands Reference - Rocket Software

rocketsoftware.com
from rocketsoftware.com More from this publisher
11.04.2013 Views

READXFWD Syntax READXFWD dyn.array.var [FROM file.var] [ON ERROR statements] {THEN statements [END] | ELSE statements [END]} Description The UniBasic READXFWD command reads the next value in an alternate key index in much the same manner as the READFWD command, but does not read the associated record. READXFWD enables a program to read alternate keys without incurring the overhead of retrieving a record every time. Parameters The following table describes each parameter of the syntax. Parameter Description 1-658 UniBasic Commands Reference dyn.array.var Specifies a dynamic array to which to assign the values read. FROM file.var Specifies the file from which to read the record. If you do not specify a file.var, UniData reads from the default file. If no default file is open, a fatal error occurs. The default file is one for which no file variable is assigned in the OPEN statement. READXFWD Parameters

Parameter Description ON ERROR statements Specifies statements to execute if the READXFWD statement fails with a fatal error because the file is not open, an I/O error occurs, or UniData cannot find the file. If you do not specify the ON ERROR clause and a fatal error occurs, the program terminates. THEN statements END THEN executes if the read is successful. END is required to terminate multiline THEN statements. ELSE statements END ELSE executes if the read is not successful or the record does not exist. END is required to terminate multiline ELSE statements. Related Commands UniBasic READBCK, READBCKL, READBCKU, READFWD, READFWDL, READFWDU, READXBCK, SELECTINDEX, SETINDEX UniData READXFWD Parameters (continued) BUILD.INDEX, CREATE.INDEX – For information, see the UniData Commands Reference. READXFWD 1-659

READXFWD<br />

Syntax<br />

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

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

Description<br />

The <strong>UniBasic</strong> READXFWD command reads the next value in an alternate key index<br />

in much the same manner as the READFWD command, but does not read the<br />

associated record. READXFWD enables a program to read alternate keys without<br />

incurring the overhead of retrieving a record every time.<br />

Parameters<br />

The following table describes each parameter of the syntax.<br />

Parameter Description<br />

1-658 <strong>UniBasic</strong> <strong>Commands</strong> <strong>Reference</strong><br />

dyn.array.var Specifies a dynamic array to which to assign the values read.<br />

FROM file.var Specifies the file from which to read the record.<br />

If you do not specify a file.var, UniData reads from the default<br />

file. If no default file is open, a fatal error occurs.<br />

The default file is one for which no file variable is assigned in<br />

the OPEN statement.<br />

READXFWD Parameters

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

Saved successfully!

Ooh no, something went wrong!