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.

Parameters<br />

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

Parameter Description<br />

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

var Specifies a variable to contain the data read from the attribute.<br />

FROM file.var, Specifies the file from which to read the attribute.<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 />

record.ID.expr Specifies a record in the file from which to read the data.<br />

attribute.expr Specifies an attribute within the file from which to read the data.<br />

ON ERROR statements Specifies statements to execute if the READVU statement fails<br />

with a fatal error because the file is not open, an I/O error occurs,<br />

or UniData cannot find the file.<br />

If you do not specify the ON ERROR clause and a fatal error<br />

occurs, the program terminates.<br />

LOCKED statements Specifies statements to execute if the record is locked by another<br />

user. If you do not specify a LOCKED clause, the program waits<br />

until the lock on the record is released.<br />

Use the ECL command DEFAULT.LOCKED.ACTION BELL<br />

to make the terminal beep while you wait for UniData to unlock<br />

the record.<br />

THEN statements END THEN executes if the read is successful. END is required to<br />

terminate multiline THEN statements.<br />

ELSE statements END ELSE executes if the read is not successful or the record (or ID)<br />

does not exist. END is required to terminate multiline ELSE<br />

statements.<br />

READVU Parameters

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

Saved successfully!

Ooh no, something went wrong!