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: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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