Difference between revisions of "UNLOCK"
From Lianjapedia
Yvonne.milne (Talk | contribs) m (1 revision) |
Yvonne.milne (Talk | contribs) |
||
Line 1: | Line 1: | ||
==Purpose== | ==Purpose== | ||
Release active table and record locks | Release active table and record locks | ||
− | |||
==Syntax== | ==Syntax== | ||
UNLOCK [ALL] [IN <alias>] | UNLOCK [ALL] [IN <alias>] | ||
− | |||
==See Also== | ==See Also== | ||
[[FLOCK()]], [[LOCKF]], [[LOCKR]], [[RLOCK()]] | [[FLOCK()]], [[LOCKF]], [[LOCKR]], [[RLOCK()]] | ||
− | |||
==Description== | ==Description== | ||
Line 20: | Line 17: | ||
The IN <alias> clause is used to release file or record locks in another workarea. Alias names may be assigned to tables with the USE command. | The IN <alias> clause is used to release file or record locks in another workarea. Alias names may be assigned to tables with the USE command. | ||
− | The UNLOCK command works in conjunction with the RLOCK() and FLOCK() functions, and the LOCKR and LOCKF commands. | + | The UNLOCK command works in conjunction with the RLOCK() and FLOCK() functions, and the LOCKR and LOCKF commands. |
− | + | ||
==Example== | ==Example== | ||
Line 28: | Line 24: | ||
use patrons index events, dates, names | use patrons index events, dates, names | ||
seek "PHANTOM" | seek "PHANTOM" | ||
− | |||
do while not rlock() | do while not rlock() | ||
sleep 2 | sleep 2 | ||
enddo | enddo | ||
− | // | + | // ... |
− | + | ||
− | + | ||
− | + | ||
unlock | unlock | ||
</code> | </code> | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
[[Category:Documentation]] | [[Category:Documentation]] | ||
[[Category:Commands]] | [[Category:Commands]] | ||
[[Category:Manual Locking]] | [[Category:Manual Locking]] | ||
[[Category:Manual Locking Commands]] | [[Category:Manual Locking Commands]] |
Revision as of 07:31, 10 February 2012
Purpose
Release active table and record locks
Syntax
UNLOCK [ALL] [IN <alias>]
See Also
FLOCK(), LOCKF, LOCKR, RLOCK()
Description
The UNLOCK command releases any active file or record locks for the currently selected workarea. This command is only effective with shared tables.
ALL
If the optional ALL keyword is specified, then the active file and record locks are released for all workareas.
IN <alias>
The IN <alias> clause is used to release file or record locks in another workarea. Alias names may be assigned to tables with the USE command.
The UNLOCK command works in conjunction with the RLOCK() and FLOCK() functions, and the LOCKR and LOCKF commands.
Example
set exclusive off use patrons index events, dates, names seek "PHANTOM" do while not rlock() sleep 2 enddo // ... unlock