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.

WRITEV<br />

Syntax<br />

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

[ON ERROR statements]<br />

Description<br />

The <strong>UniBasic</strong> WRITEV command updates a specified attribute in a file regardless<br />

of lock status.<br />

Note: The WRITEV command releases locks set by the same process. <strong>UniBasic</strong> locks<br />

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

Updating Alternate Key Indexes<br />

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

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, and then write a<br />

record that creates a duplicate alternate key, WRITEV sets the STATUS<br />

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

WRITEV 1-920

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

Saved successfully!

Ooh no, something went wrong!