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.

STATUS Function Return Values<br />

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

described in the following table.<br />

Value Description<br />

0 Successful write.<br />

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

2 Constraint violation. In this case, the <strong>UniBasic</strong> trigger subroutine returns a<br />

value of 0 in the parameter execstat, indicating that the WRITEV is not<br />

allowed.<br />

3 Trigger execution error or unexpected return from trigger routine (for<br />

example, trigger subroutine is not cataloged).<br />

10 Non-RFS files – WRITEV created a duplicate alternate index key and ECL<br />

DUP.STATUS is on; or WRITEV failed because a duplicate value exists in<br />

the index and NO.DUPS was specified when the index was created.<br />

RFS files – WRITEV created a duplicate value in the index, and ECL<br />

DUP.STATUS is on.<br />

STATUS Function Return Values<br />

Examples<br />

In the following example, the program statement writes the variable NAME to the<br />

first attribute in the customer record with CLIENT.ID in the file CLIENTS:<br />

WRITEV NAME ON CLIENT,CLIENT.ID,1<br />

WRITEV 1-922

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

Saved successfully!

Ooh no, something went wrong!