My issue is that when some process is reading data set i cannot rename it with sas utilities. E.g. "Change statement in datasets procedure". Sas says that "data set XX is in use by user YY" or something like that.
We now overcome this by issuing OS-commands. OS is Solaris. When we want to rename XX, we have macro that do "rm or mv XX".
I wonder, whether SAS actually has some way to do this without me going to issue OS-commands?
SAS is designed to "play well with others". It's behavior is consistent in not allowing you to rename a dataset while someone else is using it.
Unix was written with the philosophy that the user know what they are doing and will take the consequences of his behavior. If you rename a dataset with with the OS and the other user does another read, their process fails.
I think that you are stuck with using the OS to do the rename. BTW, other OSs will not allow you to do a rename while another process has a file open.
Processes in question are in ETL environment. In most cases they read tables only once.
So when they read and processes that builds table can't update table - this is the issue.
While doing UNIX-tied deletes and removes we can update tables well.
It's strange why not to have some options for this case.
>So when they read and processes that builds table can't update table - this is the issue.
A product called SAS/Share exists to manage multi-user table access, so you can read and write (as in update, not delete or rename, see below) tables at the same time
>In most cases they read tables only once. While doing UNIX-tied deletes and removes we can update tables well.
If the table is still locked, it is still being being read, unless the process does bizarre things. Your deleting/renaming will likely cause errors and abort the reading process. If it doesn't, maybe the reading process can release it earlier? Does it use sasfile statements or similar?