Specifies to assign
an encryption key value. You must specify the ENCRYPTKEY= data set
option when you are using ENCRYPT=AES. The key value can be up to
64 bytes long. To create an ENCRYPTKEY= key value with or without
quotation marks, follow these rules:
No quotation marks:
-
use alphanumeric characters and
underscores only
-
can be up to 64 bytes long
-
use uppercase and lowercase letters
-
-
cannot include blank spaces
-
%let mykey=abcdefghi12;
encryptkey=&mykey
encryptkey=key_value
encryptkey=key_value1
Single quotation marks:
-
use alphanumeric, special, and
DBCS characters
-
can be up to 64 bytes long
-
use uppercase and lowercase letters
-
can include blank spaces, but cannot
contain all blanks
-
encryptkey='key_value'
encryptkey='1234*#mykey'
Double quotation marks:
-
use alphanumeric, special, and
DBCS characters
-
can be up to 64 bytes long
-
use uppercase and lowercase letters
-
can include blank spaces, but cannot
contain all blanks
-
encryptkey="key_value"
encryptkey="1234*#mykey"
%let mykey=Abcdefghi12;
encryptkey="&mykey"
When the ENCRYPTKEY=
key value uses DBCS characters, the 64-byte limit applies to the character
string after it has been transcoded to UTF-8 encoding. You can use
the following DATA step to calculate the length in bytes of a key
value in DBCS:
data _null_;
key=length(unicodec('key-value','UTF8'));
put 'key length=' key;
run;