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-925 <strong>UniBasic</strong> <strong>Commands</strong> <strong>Reference</strong><br />

expr Specifies an expression to write to an attribute of a record.<br />

ON | TO file.var, Specifies a file to receive the expression.<br />

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

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 to receive the expression.<br />

attrib.expr Specifies an attribute to receive the expression.<br />

ON ERROR<br />

statements<br />

Specifies statements to execute if the WRITEVU statement fails<br />

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

in the write process, or the record contains a duplicate alternate<br />

index key).<br />

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

occurs, the program terminates.<br />

When including WRITEVU statements within a transaction, you<br />

must code an ON ERROR clause that notifies the user and takes<br />

appropriate action, such as stopping the transaction. If the<br />

transaction is not aborted by the ON ERROR clause, processing<br />

continues, and the transaction could commit inappropriately.<br />

WRITEVU Parameters

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

Saved successfully!

Ooh no, something went wrong!