Is there any way that I can determine whether the dataset is open or not?
For example, If I open the dataset "x" in the work library,which means there is a window which title bar is "VIEWTABLE: work.X".
In this situation,I exist below code
data work.x;
yy = 1;
run;
There's a ERROR log saying "member-level control" etc., you know.
To avoid this, I'm looking for a way to grasp how this data set is open before casting the dataset(work.x) to DATA step.
I know "open" function,which is for open dataset.This time I'm looking "opened" or not.
I asked “Google” but it seems no answer.
Sincerely,
The first paper in your google search is appplicable isn't it?
Try to open/lock the file and you'all get an error code if file is already opened.
The FOPEN function()
The first paper in your google search is appplicable isn't it?
Try to open/lock the file and you'all get an error code if file is already opened.
The FOPEN function()
Reeza,Thank you for your kindness every time.
Oops,actually if "open" function returns error,it means the dataset is opened.Thanks.
In case you've started looking into this because you have some sort of a control/log table where multiple processes insert or update in parallel (so only short lock of the table per process) then have also a look into option FileLockWait as this will make the locking issue "go away" for such use cases.
Thank you,Patrick.
I haven't seen "FILELOCKWAIT" System Option,so I'll check it.
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.