You can issue the LOCK
command in any SAS window. It works exactly like the LOCK statement.
For details about the
LOCK statement, see The LOCK Statement and Command.
The following SAS log
shows the message in the Log window that lets you know that the catalog
MAPSLIB.MAPSCAT.EUROMAP.CMAP has
been locked successfully. In the Program Editor window, the LOCK command
was issued to obtain a lock on the catalog MAPSLIB.MAPSCAT.EUROMAP.CMAP.
Locking a Catalog Entry
LOG
Command ===>
1 LIBNAME MAPSLIB 'SASXYZ.SHRTEST.SASDATA' SERVER=SHARE1;
NOTE: Libref MAPSLIB was successfully assigned as follows:
Engine: REMOTE
Physical Name: SASXYZ.SHRTEST.SASDATA
NOTE: MAPSLIB.MAPSCAT.EUROMAP.CMAP is now locked for
exclusive access by you.
PROGRAM EDITOR
Command ===> LOCK MAPSLIB.MAPSCAT.EUROMAP.CMAP
00001
00002
00003
00004
00005
00006
The following Program
Editor window shows a LOCK command that contains the argument CLEAR
to release the lock on the catalog
MAPSLIB.MAPSCAT.EUROMAP.CMAP.
Releasing a Lock on a Catalog Entry
PROGRAM EDITOR
Command ===> LOCK MAPSLIB.MAPSCAT.EUROMAP.CMAP CLEAR
00001
00002
00003
00004
00005
00006
In the next SAS log,
the messages in the Log window show that
MAPSLIB.MAPSCAT.EUROMAP.CMAP was successfully unlocked. The log also displays the
name of the user who clears the lock. In this example, the user who
set and cleared the lock is referred to as “you.”
SAS Log Message after the Lock Has Been Cleared
LOG
Command ===>
1 LIBNAME MAPSLIB 'SASXYZ.SHRTEST.SASDATA' SERVER=SHARE1;
NOTE: Libref MAPSLIB was successfully assigned as follows:
Engine: REMOTE
Physical Name: SASXYZ.SHRTEST.SASDATA
NOTE: MAPSLIB.MAPSCAT.EUROMAP.CMAP is now locked for
exclusive access by you.
NOTE: MAPSLIB.MAPSCAT.EUROMAP.CMAP is no longer locked
for exclusive access by you.