ISEXCLUSIVE( ) Function Example
In the following example, the ISEXCLUSIVE( ) function verifies that the table was opened for exclusive use. The table is not reindexed since the one in the current work are was not opened for exclusive use.
cExclusive = SET('EXCLUSIVE')
SET EXCLUSIVE OFF
SET PATH TO (HOME(2) + 'data\')
OPEN DATA testdata && Opens the test databsase
USE customer && Not opened exclusively
USE employee IN 0 EXCLUSIVE && Opened exclusively in another work area
IF ISEXCLUSIVE( )
REINDEX && Can only be done if table opened exclusively
ELSE
WAIT WINDOW 'The table has to be exclusively opened'
ENDIF
SET EXCLUSIVE &cExclusive