IB Statements/lock

From CometWiki

< IB Statements
Revision as of 22:12, 28 May 2009 by Barb (Talk | contribs)
Jump to: navigation, search

LOCK statement

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

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