Pages

Tuesday, June 12, 2012

How to use Lock Statement in SAS: -
A dataset may become locked explicitly using the LOCK statement or automatically if it is being modified by another SAS program. When a dataset has a lock on it, it cannot be read or modified until the lock is removed. One very easy method for waiting for the lock to be released is to use the FILELOCKWAIT libname option. For example,
libname MYLIB "/mypath/sunil" filelockwait=10;
If a dataset in MYLIB is locked and another SAS program attempts to read it, SAS will wait up to 10 seconds before giving an error.

No comments:

Post a Comment