Chapter Contents |
Previous |
Next |
SAS/SHARE User's Guide |
data library | |
data set | |
catalog | |
catalog entry. |
You can specify the name of the data object that is to be locked on the command line of a window, such as the Program Editor window in the SAS Display Manager System.
Note: You must first
access a SAS data library through a server before you can lock that library
or any data object in it.
The syntax for the LOCK command is
LOCK
libref<.member-name<.member-type
| .entry-name.entry-type>><LIST | CLEAR>; |
If you omit member-type or if you specify either the value DATA or VIEW, two locks are obtained automatically: one on libref.member-name.DATA and one on libref.member-name.VIEW.
For details about releasing locks, see Clearing an Explicit Lock.
Setting and Clearing Locks by Using the LOCK Command |
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 the LOCK Command.
Locking a Catalog Entry shows that the catalog MAPSLIB.MAPSCAT.ASIAMAP.CMAP has successfully been locked. From the Program Editor window, the LOCK command was issued to obtain a lock on another catalog- MAPSLIB.MAPSCAT.EUROMAP.CMAP.
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 |
In Releasing a Lock on a Catalog Entry, you can see that MAPSLIB.MAPSCAT.EUROMAP.CMAP was successfully locked. From the Program Editor window, the LOCK command that contains the CLEAR argument was issued to release the lock on catalog MAPSLIB.MAPSCAT.EUROMAP.CMAP.
Releasing a Lock on 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 CLEAR 00001 00002 00003 00004 00005 00006 |
In SAS Log Message after the Lock Has Been Cleared, you can see that MAPSLIB.MAPSCAT.EUROMAP.CMAP was successfully unlocked. The log also reports 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. |
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.