UniBasic Commands Reference - Rocket Software

UniBasic Commands Reference - Rocket Software UniBasic Commands Reference - Rocket Software

rocketsoftware.com
from rocketsoftware.com More from this publisher
11.04.2013 Views

FILEUNLOCK Syntax FILEUNLOCK [file.var] [ON ERROR statements] Description The UniBasic FILEUNLOCK command unlocks a file previously locked with a FILELOCK command. Parameters The following table describes each parameter of the syntax. Parameter Description Example In the following example, the FILEUNLOCK statement unlocks the file referred to by the file variable INVENTORY.FILE: FILEUNLOCK INVENTORY.FILE 1-258 UniBasic Commands Reference file.var Specifies the file to unlock. If you do not specify a file.var, UniData reads from the default file. If no default file is open, a fatal error occurs. A default file is one for which no file variable is assigned in the OPEN statement. ON ERROR statements Specifies statements to perform if the FILEUNLOCK statement fails with a fatal error condition because the file is not open. If you do not specify the ON ERROR clause, the program terminates. FILEUNLOCK Parameters

Related Commands UniBasic FILELOCK, RECORDLOCKED, RELEASE FILEUNLOCK 1-259

FILEUNLOCK<br />

Syntax<br />

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

Description<br />

The <strong>UniBasic</strong> FILEUNLOCK command unlocks a file previously locked with a<br />

FILELOCK command.<br />

Parameters<br />

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

Parameter Description<br />

Example<br />

In the following example, the FILEUNLOCK statement unlocks the file referred to<br />

by the file variable INVENTORY.FILE:<br />

FILEUNLOCK INVENTORY.FILE<br />

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

file.var Specifies the file to unlock.<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 FILEUNLOCK 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.<br />

FILEUNLOCK Parameters

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

Saved successfully!

Ooh no, something went wrong!