SAS/SHARE delivers an informational or an error message if you
attempt to access a data object that is already in use or that is
locked by another operation. The message is issued in the following
form:
SAS library | SAS data
member | SAS data file observation or catalog
locked for exclusive
access | in use | not locked
you | user user(server-connection-number) | n other users of this
server | task FSEDIT (server-connection-number)
The messages explain
the status of the data object that is being accessed. To recover,
you usually must wait until the data object is available or find out
when the data object will be available by talking to the person who
has locked the object. Here are some examples of messages.
In the first example,
the SAS library that is referenced by MYLIB is locked by user SASUSER(1).
A lock on a library prevents other users from reading, updating, or
deleting existing SAS files or from creating new SAS files in that
library. The lock also prevents other users from obtaining a list
of files in the library. The lock does not prevent users from issuing
LIBNAME statements to access the library, but it does prevent them
from using SAS files in the library while it is locked. You must wait
for user SASUSER(1) to unlock the library before you can use it.
NOTE: SASUSER.MYLIB is not locked or in use by you,
but is locked for exclusive access by user sasuser(1).
In this example, because
two users are already accessing the MYCAT member in the MYLIB library,
you can infer that no locks have been set on the catalog, and that
users are reading catalog entries or adding entries to the catalog.
Although you can browse the catalog or add entries to the catalog,
you cannot attempt to lock the catalog until there are no others using
it.
NOTE: MYLIB.MYCAT.CATALOG is not locked or in use by you,
but is in use by 2 other users of this server.
The catalog entry MYCATENTRY
of type CMAP in the catalog MYLIB.MYCAT is not locked by user SASUSER(1).
This message results when user SASUSER attempts to unlock a catalog
entry that another client has locked.
NOTE: MYLIB.MYCAT.MYCATENTRY.CMAP is not locked by sasuser(1).
The following LOCK statement
lists in the SAS log whether a specified data object is locked and
by whom. The format used in the LOCK statement for listing lock status
is
data-object is status by whom
lock educlib.mycat.catalog list;
EDUCLIB is locked by sasuser