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.

The following example is taken from the sample program in Appendix A, “Sample<br />

Program,” in Developing <strong>UniBasic</strong> Applications. It demonstrates using WRITEV to<br />

write an attribute. Notice that the attribute is read and the record locked. Then<br />

LOCATE is used to determine the position (within the attribute) of the value to be<br />

deleted. After that value is deleted, the attribute is written back to the record.<br />

1-923 <strong>UniBasic</strong> <strong>Commands</strong> <strong>Reference</strong><br />

DELETE_RECORD:<br />

* (Assuming the order #'s are on line 12)<br />

READVU ORDER_LINE FROM CLIENT_FILE,CLIENT_NUMBER,12 THEN<br />

LOCATE ORDER_NUMBER IN ORDER_LINE SETTING POSITION THEN<br />

DEL ORDER_LINE<br />

END<br />

WRITEV ORDER_LINE ON CLIENT_FILE, CLIENT_NUMBER, 12<br />

END<br />

*<br />

DELETE ORDERS_FILE, ORDER_NUMBER<br />

RELEASE CLIENT_FILE,CLIENT_NUMBER<br />

RETURN<br />

Related <strong>Commands</strong><br />

<strong>UniBasic</strong><br />

CLOSE, DELETE, OPEN, READL, READU, READV, READVL, READVU,<br />

WRITE, WRITEU, WRITEVU<br />

UniData<br />

DUP.STATUS – For information, see the UniData <strong>Commands</strong> <strong>Reference</strong>.

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

Saved successfully!

Ooh no, something went wrong!