IB Statements/lock

From CometWiki

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

LOCK statement

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

Discussion: The LOCK statement locks a logical unit number. It is a way to prevent a specified file from being opened by another user.

The lun parameter is a numeric or symbolic constant that is previously assigned to a file by an OPEN statement -- it represents the logical unit to be locked.

If th LOCK statement is attempted while another user has the particular file open, an exception 7 (FILE UNAVAILABLE -- LOCK/UNLOCK ERROR) will be encountered.

Example: OPEN (1) "FILEB"

LOCK (1)

.

.

UNLOCK (1)

CLOSE (1)

Personal tools