Is there a single command to do this or does each dataset have to be specified. I am running into locking issues on our server and until it is upgraded I have to put SAS to sleep (say 0.5 seconds) at certain spots in the code to avoid errors. Any helpful suggestions are welcome.
I have to put SAS to sleep (say 0.5 seconds) at certain spots in the code to avoid errors
Do you have a process where tables are opening by themselves? Using EG with a process flow and tables are being shown or results?
There's an option in either way to turn off results as they're generated so that when running long programs you don't see the output until you go to it.
Most data set locks are unrelated to the server. For example:
In those types of situations, there is no way to free up the locked data set until the first program is finished with it.
Some locking situations are environment-specific. For example, the rules/tools for EG might be different than the rules/tools for an IBM mainframe. A few details might help, both about the environment and about the conditions that cause locking.
The environment is Windows 7 Enterprise and I am using EG 7.15. What I am doing is remove interim datasets at the end of some data steps & SQL calls using PROC DATASETS to unclutter the project view. However, I also run into this from time to time in other areas as well. What I've done is to sort any dataset to a new dataset which seems to alleviate most of the errors.
Sounds like you are doing the right thing (see the first bullet point above).
The second bullet point requires a more difficult fix, as it involves analyzing (and possibly reorganizing) the order of steps in multiple processes to avoid contention for the same data set.
Keep fixing what you are fixing. Upgrading to a new server will be largely ineffective, helping only to the extent that the new server can sort data sets faster than the old server.
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
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.
Ready to level-up your skills? Choose your own adventure.