BookmarkSubscribeRSS Feed
Sarah-R
Obsidian | Level 7

What is the opposite of Access=readonly?

Can a data set that has had been made access readonly be reverted back to read and write?  How do I revert it back to access read and write?

4 REPLIES 4
PaigeMiller
Diamond | Level 26

In a LIBNAME statement, just re-run the LIBNAME without access=readonly on the end.

--
Paige Miller
Kurt_Bremser
Super User

ACCESS=READONLY is not a dataset option, but an option of the LIBNAME statement. Therefore, if you clear the libname and re-assign the library for the same path without the option, it becomes writable.

 

sbxkoenk
SAS Super FREQ

Hello,

I guess your dataset is read-only because of the library it is residing in.

Maybe that library was assigned with the 'access=readonly' option??

Clear the libname and assign it again to the same path but without the access=readonly option. This has an effect on all library members of course!

Or the dataset was made read-only in the OS, then you have to switch off read-only on the OS as well.

Cheers,

Koen

Tom
Super User Tom
Super User

Make a new libref.  Depending on how the original libref is defined you might be able to do it using the PATHNAME() function.

 

libname readonly "mydirectory" access=readonly;
libname write "%sysfunc(pathname(readonly))" ;

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!

How to Concatenate Values

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.

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
  • 4 replies
  • 4934 views
  • 0 likes
  • 5 in conversation