IB Statements/unlock

From CometWiki

(Difference between revisions)
Jump to: navigation, search
Badge (Talk | contribs)
(New page: '''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 o...)
Newer edit →

Revision as of 09:41, 20 May 2009

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.