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.

FILELOCK<br />

Syntax<br />

FILELOCK [file.var] [ON ERROR statements] LOCKED statements<br />

Description<br />

The <strong>UniBasic</strong> FILELOCK command locks the dictionary or data portion of a file<br />

against access by READL, READU, READVU, MATREADL, MATREADU,<br />

MATWRITEU, WRITEU, and WRITEVU statements. Other file input/output<br />

commands ignore FILELOCK.<br />

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

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

Parameters<br />

The following table describes each parameter of the syntax.<br />

Parameter Description<br />

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

file.var Specifies the file to lock.<br />

If you do not specify a file.var, UniData reads from the default<br />

file. If no default file is open, a fatal error occurs.<br />

A default file is one for which no file variable is assigned in the<br />

OPEN statement.<br />

ON ERROR statements Specifies statements to perform if the FILELOCK statement<br />

fails with a fatal error condition because the file is not open.<br />

If you do not specify the ON ERROR clause, the program<br />

terminates abnormally.<br />

LOCKED statements Specifies statements to execute if the file is already locked.<br />

FILELOCK Parameters

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

Saved successfully!

Ooh no, something went wrong!