How can I set a sas data table (sas7bdat
) to read-only within a SAS Program? — the table must remain readonly even between sessions, especially if another user registers the library and attempts to write to the dataset. Once these tables have been created I do not wish to ever edit them - they are "point-in-time" reference tables that others and myself may rely on. Being able to lock dow the tables and guarantee that they tables have not been accidentally changed would save a lot of data verification each time these tables are used.
I wish to protect only from dangerous code that may accidentally alter the table, such as :
PROC SORT
DATA = JUSTIN.myreadonlytable;
BY
ref
start_date;
RUN;
I do not mind if someone can alter a read-only flag in the filesystem but I would like that the default behaviour in SAS is to error when an attempt to write to the table occurs.
If you want to prevent people from accidentally writing to the dataset, then you want to assign an alter
password.
data test(alter="def");
set sashelp.class;
run;
That prevents altering (writing to, replacing, deleting) the dataset without supplying the password in the same fashion (or typing the password in a popup window).
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments