SAS Component Language Dictionary |
Category: | SAS Table |
Syntax | |
Details | |
Example |
Syntax |
sysrc=LOCK(member<,action>); |
contains the return code for the operation:
0 | |
>0 | |
<0 |
the operation was completed, but a warning or a note was generated. |
is a member of a SAS data library or a SAS catalog entry. The value that you specify can be a one-, two-, three-, or four-level name. A one-level name is presumed to be a libref, whereas a two-level name defaults to the SAS table type DATA.
specifies an action to be performed on the SAS table or catalog entry:
Details |
If action is not provided, the action defaults to LOCK.
Example |
Lock the data library that is associated with a libref of A, unlock data view LIB.A, and lock LIB.A.B.PROGRAM. Then, query the lock state of the FOO.ONE table:
rc=lock('a'); rc=lock('lib.a.view','clear'); rc=lock('lib.a.b.program'); rc=lock('foo.one.data','query'); if (rc=%sysrc(_SWLKUSR)) then _msg_='Table foo.one is currently locked.';
Copyright © 2009 by SAS Institute Inc., Cary, NC, USA. All rights reserved.