Specifies whether to encrypt an output SPD Engine data set.
Valid in: | DATA step and PROC step |
Default: | NO |
Restrictions: | Use only with output data sets |
ENCRYPT=YES or ENCRYPT=AES cannot be used with COMPRESS= |
encrypts the data set using the AES (Advanced Encryption Standard) algorithm. AES provides stronger encryption using SAS/SECURE software, which is included with Base SAS software. You must use the ENCRYPTKEY= data set option when using ENCRYPT=AES. For more information, see ENCRYPTKEY= Data Set Option.
CAUTION: |
Record
all ENCRYPTKEY= key values if you specify ENCRYPT=AES.
If you forget the ENCRYPTKEY=
key value, you lose your data. SAS cannot assist you in recovering
the ENCRYPTKEY= key value. The following note is written to the log:
Note: If you lose or forget the ENCRYPTKEY= key value, there will be no way to open the file or recover the data. |
does not encrypt the data set.
encrypts the data set using the SAS Proprietary algorithm. This encryption method uses passwords that are stored in the data set. At a minimum, you must specify the READ= 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.
ERROR: The data set was not created because compression and encryption cannot both be specified.
libname depta spde 'SAS-library';
data 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=salary(read=green); run;
data 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.1To use this data set, specify the ENCRYPTKEY= key value:
proc contents data=salary(encryptkey=green); run;
PROC COPY IN=inlib OUT=outlib ENCRYPTKEY=secret; SELECT abc (ENCRYPTKEY=secreta) DEF(ENCRYPTKEY=secretb)…
PROC COPY IN=inlib OUT=outlib; SELECT abc (ENCRYPTKEY=secreta) DEF(ENCRYPTKEY=secretb)…