Usage Note 43188: Changing ALTER= password on encrypted data set
When a data set has an ALTER= password associated with it, that password continues to stay with the data set even when it is recreated. You can normally use PROC DATASETS to change the password, but if the data set is also encrypted, that is not possible. An error will result indicating that the password cannot be changed on an encrypted data set.
The data set must recreated with encryption off. Change the password, and then encrypt the data set again.
Operating System and Release Information
SAS System | Base SAS | Microsoft Windows Server 2003 Standard Edition | 9 TS M0 | |
Microsoft Windows XP Professional | 9 TS M0 | |
Microsoft Windows Server 2003 Enterprise Edition | 9 TS M0 | |
Microsoft Windows Server 2003 Datacenter Edition | 9 TS M0 | |
Microsoft Windows NT Workstation | 9 TS M0 | |
Microsoft Windows 2000 Server | 9 TS M0 | |
Microsoft Windows 2000 Professional | 9 TS M0 | |
Microsoft Windows 2000 Datacenter Server | 9 TS M0 | |
Microsoft Windows 2000 Advanced Server | 9 TS M0 | |
Microsoft Windows Server 2003 Enterprise 64-bit Edition | 9 TS M0 | |
Microsoft Windows Server 2003 Datacenter 64-bit Edition | 9 TS M0 | |
z/OS | 9 TS M0 | |
Microsoft® Windows® for 64-Bit Itanium-based Systems | 9 TS M0 | |
64-bit Enabled AIX | 9 TS M0 | |
64-bit Enabled HP-UX | 9 TS M0 | |
64-bit Enabled Solaris | 9 TS M0 | |
HP-UX IPF | 9 TS M0 | |
Linux | 9 TS M0 | |
OpenVMS Alpha | 9 TS M0 | |
Tru64 UNIX | 9 TS M0 | |
*
For software releases that are not yet generally available, the Fixed
Release is the software release in which the problem is planned to be
fixed.
The code demonstrates how to assign READ= and ALTER= passwords while turning encryption on, how to remove encryption, how to change the ALTER= password, and then add encryption to the data set again.
/* Create an encrypted data set */
data one(encrypt=yes read=red alter=abcd16);
x=11;
run;
/* Shows data encrypted with read and alter password protection */
proc contents data=one(read=red);
run;
/* FAILS: Which is what it should do. */
/* Password modification not allowed on an encrypted file */
proc datasets lib=work;
modify one(read=red alter=abcd16/newalter);
quit;
/* -----------------------------------------------------------*/
/* Convert into an unencrypted data set */
data one(encrypt=no read=red alter=abcd16);
set one(read=red alter=abcd16);
run;
/* Shows data not encrypted but read and alter password protected */
proc contents data=one(read=red);
run;
/* Change the an alter password (permitted because now not encrypted). */
proc datasets lib=work;
modify one(read=red alter=abcd16/newalter);
quit;
/* Shows data not encrypted but read & alter password protected */
proc contents data=one(read=red);
run;
/* -----------------------------------------------------------*/
/* Convert to an encrypted data set with a new password */
data one(encrypt=yes read=blue alter=newalter);
set one (read=red alter=newalter);
run;
/* WORKS with new read password (as it should) */
/* Shows data encrypted and with read & alter password protection */
proc contents data=one(read=blue);
run;
Type: | Usage Note |
Priority: | |
Topic: | SAS Reference ==> DATA Step SAS Reference ==> Data Set Options ==> Miscellaneous
|
Date Modified: | 2011-05-09 10:56:25 |
Date Created: | 2011-05-06 12:43:10 |