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))" ;
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.

SAS Training: Just a Click Away

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

Browse our catalog!

Discussion stats
  • 4 replies
  • 6666 views
  • 0 likes
  • 5 in conversation