Published on :
Data Management CREATION_INTERNE

Password Protection for Data Tables

This code is also available in: Deutsch Español Français
Awaiting validation
This script demonstrates how to create a permanent SAS© table ('advrpt.pword') with enhanced security options. It uses the 'encrypt=yes' option to encrypt the physical file and defines separate passwords for reading ('read=') and writing ('write='). The table is populated with static data and then displayed using PROC PRINT.
Data Analysis

Type : CREATION_INTERNE


Data is manually created in the DATA step using assignment statements and the OUTPUT command.

1 Code Block
DATA STEP Data
Explanation :
Creation of a SAS table named 'pword' in the 'advrpt' library. The dataset options enable encryption and define the required passwords for access ('readpwd' for reading, 'writepwd' for writing).
Copied!
1DATA advrpt.pword(encrypt=yes pwreq=yes read=readpwd write=writepwd);
2 DB='DEApp'; UID='MaryJ'; pwd='12z3'; OUTPUT;
3 DB='p127'; UID='Mary'; pwd='z123'; OUTPUT;
4 RUN;
2 Code Block
PROC PRINT
Explanation :
Attempt to display the protected table. In an interactive session, SAS would prompt for the read password.
Copied!
1PROC PRINT DATA=advrpt.pword;
2 RUN;
This material is provided "as is" by We Are Cas. There are no warranties, expressed or implied, as to merchantability or fitness for a particular purpose regarding the materials or code contained herein. We Are Cas is not responsible for errors in this material as it now exists or will exist, nor does We Are Cas provide technical support for it.