02-24-2016 12:15 PM
I am constantly getting this error "A lock is not available for dataset" when data set is writing or some body has opened the data set. I wonder if there is an effective solution to overcome this or to know if the data set is in use.
02-25-2016 04:28 AM - edited 02-25-2016 04:30 AM
One way to test the availibilty of a dataset is to try opening it. For example:
data _null_; DSID=open('work.table'); if DSID then putlog 'Unlocked'; else putlog 'Locked'; RC=close(DSID); run;
If you need access while writes are taking place, SAS/SHARE might be your answer.
It allows just this.
02-25-2016 07:34 AM
Please describe your environment.
What kind of data, and access patterns to the data do you have?
What kind of updates do you do, frequency?
Data volumes etc.
02-25-2016 10:55 AM - edited 02-25-2016 10:57 AM
@LinusH Windows environment. This is related to financial data such customer information, transactions etc. The programs are scheduled to run daily, hence, they are updated daily. Some programs also create historical data (appending today's data to yesterday;s). Data records are in hundred of millions. When I am creating some ad hoc report using the permanent data set that is currently being written by the program, I get this error. I suppose I have to wait until it finished buliding the data set.
02-25-2016 11:19 AM