The SET LOCK command sets locks on tables. SET Lock should be set on when a user wants to be certain that no other user will alter data in the tables being updated during a procedure. This command is useful in conjunction with the DECLARE CURSOR command. If R:BASE cannot lock all tables listed in the command, it does not lock any of the tables listed in the command.
Exclusive table locks are cumulative--that is, for each SET LOCK tblname on command you issue, you must issue a corresponding SET LOCK tblname off command to remove the lock from that table. Also, the user who locked the table must issue the SET LOCK tblname OFF command.
The SET LOCK command is typically used in an application program to set locks, allow a procedure to be performed, then remove locks.
Automatic locking is in effect even if the SET LOCK command is issued. Setting locks off affects only locks set by the SET LOCK tblname ON command--not locks that R:BASE sets automatically.