IB Statements/lock

From CometWiki

(Difference between revisions)
Jump to: navigation, search
(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 ...)
Line 1: Line 1:
'''LOCK statement'''  
'''LOCK statement'''  
-
'''Syntax:'''  LOCK (lun) [,EXCP=statement-label]   
+
'''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.  
'''Discussion:'''  The LOCK statement locks a logical unit number. It is a way to prevent a specified file from being opened by another user.  

Revision as of 22:12, 28 May 2009

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