IB Statements/unlock

From CometWiki

< IB Statements
Revision as of 09:41, 20 May 2009 by Badge (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

UNLOCK statement

Syntax: UNLOCK (lun) [,EXCP=statement-label]

Discussion: The UNLOCK statement removes the restriction of a previous LOCK on a file. It is issued on a lun which has been previously opened by the user. If a file is successfully locked, any other user will get an exception 7 on an attempted open, until the file is unlocked by the locking user.

Example: OPEN (1) "FILEB"

LOCK (1)

.

.

UNLOCK (1)

CLOSE (1)

This example shows several related file statements. First, a data file is opened and locked. Later in the program, the file is unlocked and closed.

Personal tools