Specifies whether to encrypt an output SAS data set.
Valid in: | DATA step and PROC steps |
Category: | Data Set Control |
Default: | ENCRYPT=NO |
Restriction: | Use with output data sets only. |
encrypts the file by using the AES (Advanced Encryption Standard) algorithm. AES provides enhanced encryption by using SAS/SECURE software, which is included with Base SAS software. You must specify the ENCRYPTKEY= data set option when you are using ENCRYPT=AES. For more information, see ENCRYPTKEY= Data Set Option.
Restriction | The tape engine does not support ENCRYPT=AES. Use ENCRYPT=YES for tape engine encryption. |
CAUTION: |
Record
all ENCRYPTKEY= values when you are using ENCRYPT=AES.
If you forget to record
the ENCRYPTKEY= value, you lose your data. SAS cannot assist you in
recovering the ENCRYPTKEY= value. The following note is written to
the log:
Note: If you lose or forget the ENCRYPTKEY= value, there will be no way to open the file or recover the data. |
does not encrypt the file.
encrypts the file by using the SAS Proprietary algorithm. This encryption uses passwords that are stored in the data set. At a minimum, you must specify the READ= data set option or the PW= data set option at the same time that you specify ENCRYPT=YES. Because the encryption method uses passwords, you cannot change any password on an encrypted data set without re-creating the data set.
libname mylib "c:\mylib"; data mylib.salary(encrypt=yes read=green); input name $ yrsal bonuspct; datalines; Muriel 34567 3.2 Bjorn 74644 2.5 Freda 38755 4.1 Benny 29855 3.5 Agnetha 70998 4.1 ;
proc contents data=mylib.salary(read=green); run;
libname mylib "c:\mylib"; data mylib.salary(encrypt=aes encryptkey=green); input name $ yrsal bonuspct; datalines; Muriel 34567 3.2 Bjorn 74644 2.5 Freda 38755 4.1 Benny 29855 3.5 Agnetha 70998 4.1 ;The following example encrypts the data set by using the AES algorithm:
proc contents data=mylib.salary(encryptkey=green); run;