BookmarkSubscribeRSS Feed
cbrotz
Pyrite | Level 9

We have a SAS dataset that multiple SAS users append to on a regular basis.  For some reason, it is missing data quite frequently and I need to do a file restore back to the most recent version.  Has anyone had this happen with a file that is frequently appended to?  It is the only file I am seeing issues with so I am thinking it has something to do with multiple users appending.

5 REPLIES 5
AlanC
Barite | Level 11

A SAS dataset is not designed to be used in a shared configuration like this. It is a simple, physical file on a disk. Reading is probably fine but writing is bad. You are probably seeing file locks happening.

 

Find a storage mechanism that handles concurrent access such as a DBMSs (ex. SQL Server).

https://github.com/savian-net
SASKiwi
PROC Star

SAS datasets are not designed to be updated at the same time by different users. The user who gets a lock on the dataset first will be able to append, but others trying to append at the same time will fail with log errors. You could try experimenting with the FILELOCKWAIT LIBNAME option, but you would have to ensure that ALL users apply the option when needing to append the dataset.

cbrotz
Pyrite | Level 9

What if we had each user append to their own SAS file and ran an overnight job that did the final append to the main table? 

AlanC
Barite | Level 11
That should be fine. It is very simple to use a DB as well. You need SAS/Access to ODBC/OleDB/etc. but a db is optimal here.
https://github.com/savian-net
SASKiwi
PROC Star

That sounds like a good solution as long as users don't need to see other users appends during the same day.

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 5 replies
  • 754 views
  • 0 likes
  • 3 in conversation