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.

Parameters<br />

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

Parameter Description<br />

1-921 <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 WRITEV error occurs.<br />

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

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 WRITEV 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 WRITEV 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 transaction<br />

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

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

WRITEV Parameters

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

Saved successfully!

Ooh no, something went wrong!