The levels of protection for SAS views and stored programs are similar
to the levels of protection for other types of SAS files. However,
with SAS views, passwords affect not only the underlying data, but
also the view’s definition (or source statements).
You can specify three
levels of protection for SAS views: Read, Write, and Alter. The following
section describes how these data set options affect the underlying
data as well as the view’s descriptor information. Unless otherwise
noted, the term “view” refers to any type of SAS view
and the term “underlying data” refers to the data that
is accessed by the SAS view:
-
protects against reading of the
SAS view's underlying data
-
prevents the display of source
statements in the SAS log when using DESCRIBE
-
allows replacement of the SAS view
-
protects the underlying data associated
with a SAS view by insisting that a Write password is given
-
prevents the display of source
statements in the SAS log when using DESCRIBE
-
allows replacement of the SAS view
-
prevents the display of source
statements in the SAS log when using DESCRIBE
-
protects against replacement of
the SAS view
Like passwords for
other SAS files, the Read, Write, and Alter passwords for views are
hierarchical, with the Alter password being the most restrictive and
the Read password being the least restrictive. To DESCRIBE a password-protected
view, you must specify its password. If the view was created with
more than one password, you must use its most restrictive password
to DESCRIBE the view.
For example, to DESCRIBE
a view that has both Read and Write protection, you must specify its
Write password. Similarly, to DESCRIBE a view that has both Read and
Alter protection, you must specify its alter password (since Alter
is the most restrictive of the two).
The following program
shows how to use the DESCRIBE statement to view the descriptor information
for a Read and Alter protected view:
/*create a view with read and alter protection*/
data exam / view=exam(read=read alter=alter);
set grades;
run;
/*describe the view by specifying the most restrictive password */
data view=exam(alter=alter);
describe;
run;
Log Output for Password-protected View
In most DATA and PROC
steps, the way you use password-protected views is consistent with
the way that you use other types of password-protected SAS files.
For example, the following PROC PRINT prints a Read-protected view:
proc print data=mylib.grade(read=green);
run;
Note: You might experience unexpected
results when you place protection on a SAS view if some type of protection
is already placed on the underlying data set.