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

expr Specifies an expression to write to the file.<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 WRITEU 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 />

ON ERROR<br />

statements<br />

Specifies statements to execute if the WRITEU 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). If the transaction is not aborted by the ON ERROR<br />

clause, processing continues, and the transaction could commit<br />

inappropriately.<br />

WRITEU Parameters<br />

STATUS Function Return Values<br />

After you execute WRITEU, the STATUS function returns one of the values<br />

described in the following table.<br />

Return Value Description<br />

0 Successful write.<br />

1 System error, such as a damaged file.<br />

STATUS Function Return Values<br />

WRITEU 1-918

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

Saved successfully!

Ooh no, something went wrong!