Renames variables in the SAS data set specified in the MODIFY
statement.
RENAME old-name-1=new-name-1
<...old-name-n=new-name-n>;
|
- old-name=new-name
-
changes the name of a variable in the data set specified
in the MODIFY statement. old-name must be a variable that already
exists in the data set. new-name cannot be the name of a variable
that already exists in the data set or the name of an index, and the new name
must be a valid SAS name. See "Rules for SAS Variable Names" in
SAS Language Reference: Concepts.
-
If old-name does not exist in the SAS data set or new-name already exists, PROC DATASETS
stops processing the RUN group
containing the RENAME statement and issues an error message.
-
When you use the RENAME statement to change the name of a variable
for which there is a simple index, the statement also renames the index.
-
If the variable that you are renaming is used in a composite index,
the composite index automatically references the new variable name. However,
if you attempt to rename a variable to a name that has already been used for
a composite index, you receive an error message.
Copyright © 2010 by SAS Institute Inc., Cary, NC, USA. All rights reserved.