Assigning a Password to an Existing Data Set
You can use the MODIFY statement in the DATASETS procedure to assign passwords
to unprotected members if the SAS data file already exists.
/* assign an alter password to STUDENTS */
proc datasets library=mylib;
modify students(alter=red);
run;
Assigning a Password with a Procedure
You can assign a password after an OUT= data set specification in some procedures.
/* assign a write and an alter password to SCORE */
proc sort data=mylib.math
out=mylib.score(write=yellow alter=red);
by number;
run;
You can assign a password in a CREATE TABLE or a CREATE VIEW statement in
PROC SQL.
/* assign an alter password to the SAS view BDAY */
proc sql;
create view mylib.bday(alter=red) as
query-expression;
Assigning a Password with the SAS Windowing Environment
You can create or change passwords for any data file using the Password Window in the
SAS windowing environment. To invoke the Password Window from the ToolBox, use
the global command SETPASSWORD followed by the filename. This opens the
password window for the specified data file.
Assigning a Password outside of SAS
A SAS password does not control access to a SAS file beyond the SAS system. You
should use the operating system-supplied utilities and file-system security controls in
order to control access to SAS files outside of SAS.
Removing or Changing Passwords
To remove or change a password, use the MODIFY statement in the DATASETS
procedure. For more information, see “DATASETS Procedure” in Base SAS Procedures
Guide.
732 Chapter 36 File Protection

Get SAS 9.4 Language Reference, 6th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.