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.

WRITEVU<br />

Syntax<br />

WRITEVU expr {ON | TO} [file.var,] record.ID.expr, attrib.expr<br />

[ON ERROR statements]<br />

Description<br />

The <strong>UniBasic</strong> WRITEVU command writes an expression to an attribute of a record<br />

regardless of lock status. This command retains locks. As with the WRITEV<br />

statement, the record ID and attribute number are mandatory.<br />

Note: <strong>UniBasic</strong> locks are advisory only. For more information, see Developing<br />

<strong>UniBasic</strong> Applications..<br />

Updating Alternate Key Indexes<br />

Remember the following points about alternate key indexes when you code<br />

WRITEVU statements:<br />

Alternate key indexes that are currently enabled are automatically updated<br />

when you write a record.<br />

If you execute the ECL command DUP.STATUS ON, then write a record<br />

that creates a duplicate alternate key, WRITEVU sets the STATUS return<br />

value to 10.<br />

If the NO.DUPS keyword was specified when the alternate key index was<br />

created, <strong>UniBasic</strong> will not write a record that would create a duplicate index<br />

key. Instead, the ON ERROR clause executes (or the program aborts if ON<br />

ERROR is not coded) and the STATUS function returns a value of 10. RFS<br />

does not support NO.DUPS.<br />

WRITEVU 1-924

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

Saved successfully!

Ooh no, something went wrong!