Usage Note 46868: How to rename a variable to change the case of the variable name
If you have a variable called "TEST" that was first referenced using all upper case letters you cannot create additional variable names of "Test" and "test" since all variations of case represent the same variable. SAS stores the case of the variable that was first referenced and will continue to use that for display purposes.
If you want to change the case of the same variable name for example, from "TEST" to "test", it is best to use the DATASETS procedure with the MODIFY and RENAME statements.
Currently, you can also change the case of a variable using the RENAME= data set option, but this is valid only for input data sets, such as in a SET or MERGE statement, or as input to a procedure in the DATA= option. The RENAME= data set option for output data sets and the RENAME statement cannot be used to rename a variable simply to change the case.
In versions of SAS prior to SAS 9, internal processing for both input and output processing use case sensitive processing. With SAS 9 and beyond, output processing changed to use case insensitive processing for improved efficiency . Case insensitive means internally the case is not recognized so there is no difference between an upper case letter versus a lower case letter. With SAS 9, the current input processing uses case sensitive processing. This allows the RENAME= data set option to be used to rename the case of a variable for input data sets, but this could change in the future. It is best to use PROC DATASETS with the MODIFY and RENAME statements to change the case of a variable.
Operating System and Release Information
SAS System | Base SAS | Aster Data nCluster on Linux x64 | | |
DB2 Universal Database on AIX | | |
DB2 Universal Database on Linux x64 | | |
Greenplum on Linux x64 | | |
Netezza TwinFin 32bit blade | | |
Netezza TwinFin 32-bit SMP Hosts | | |
Netezza TwinFin 64-bit S-Blades | | |
Netezza TwinFin 64-bit SMP Hosts | | |
Teradata on Linux | | |
z/OS | | |
Z64 | | |
OpenVMS VAX | | |
Microsoft® Windows® for 64-Bit Itanium-based Systems | | |
Microsoft Windows Server 2003 Datacenter 64-bit Edition | | |
Microsoft Windows Server 2003 Enterprise 64-bit Edition | | |
Microsoft Windows XP 64-bit Edition | | |
Microsoft® Windows® for x64 | | |
OS/2 | | |
Microsoft Windows 95/98 | | |
Microsoft Windows 2000 Advanced Server | | |
Microsoft Windows 2000 Datacenter Server | | |
Microsoft Windows 2000 Server | | |
Microsoft Windows 2000 Professional | | |
Microsoft Windows NT Workstation | | |
Microsoft Windows Server 2003 Datacenter Edition | | |
Microsoft Windows Server 2003 Enterprise Edition | | |
Microsoft Windows Server 2003 Standard Edition | | |
Microsoft Windows Server 2003 for x64 | | |
Microsoft Windows Server 2008 | | |
Microsoft Windows Server 2008 for x64 | | |
Microsoft Windows XP Professional | | |
Windows 7 Enterprise 32 bit | | |
Windows 7 Enterprise x64 | | |
Windows 7 Home Premium 32 bit | | |
Windows 7 Home Premium x64 | | |
Windows 7 Professional 32 bit | | |
Windows 7 Professional x64 | | |
Windows 7 Ultimate 32 bit | | |
Windows 7 Ultimate x64 | | |
Windows Millennium Edition (Me) | | |
Windows Vista | | |
Windows Vista for x64 | | |
64-bit Enabled AIX | | |
64-bit Enabled HP-UX | | |
64-bit Enabled Solaris | | |
ABI+ for Intel Architecture | | |
AIX | | |
HP-UX | | |
HP-UX IPF | | |
IRIX | | |
Linux | | |
Linux for x64 | | |
Linux on Itanium | | |
OpenVMS Alpha | | |
OpenVMS on HP Integrity | | |
Solaris | | |
Solaris for x64 | | |
Tru64 UNIX | | |
*
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.
Type: | Usage Note |
Priority: | |
Topic: | SAS Reference ==> Statements ==> Information ==> RENAME SAS Reference ==> Data Set Options ==> Variable Control ==> RENAME= SAS Reference ==> Procedures ==> DATASETS
|
Date Modified: | 2012-06-22 16:01:17 |
Date Created: | 2012-06-22 13:14:07 |