IB Statements/lock
From CometWiki
(Difference between revisions)
Badge (Talk | contribs)
(New page: '''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 ...)
Newer edit →
(New page: '''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 ...)
Newer edit →
Revision as of 09:39, 20 May 2009
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)