RENAME Statement (Optional)
Renames DBMS columns
Applies to: |
New databases |
Syntax
RENAME variable-identifier= name <…variable-identifier-n= name-n> ;
Syntax Description
The RENAME statement specifies that you want to change the names of the SYSTEM 2000
items associated with the listed SAS variables. The new
component names go into the
access descriptor and the
view descriptor that are created for the new
database.
variable-identifier can be either the
SAS variable name or the positional equivalent in the LIST output, which is the number that represents
the variable's place in the data file. For example, if you want to rename the item
associated
with the third SAS variable, submit the following statement:
rename 3='employee name';
The name must be a valid SYSTEM 2000
component name. If the item name includes embedded blanks or invalid SAS name characters, such as
the pound sign (#) or hyphen (-), you must enclose the item name in single quotation
marks.
n is
an integer from 1 to a maximum of 9,999.
The RENAME statement enables you to include variables that were deleted. For example,
if you first submit the statement DELETE 3 and then submit RENAME 3=XYZ, the third
variable will be included and assigned the name XYZ and the default
item type.
If you do not use the
RENAME statement, all SYSTEM 2000 item names default to the corresponding
SAS names or to the SAS labels if you submitted the LABEL statement.
You can list multiple variables in one RENAME statement. The RENAME
statement overrides the LABEL statement for the items that are renamed.
Copyright © SAS Institute Inc. All rights reserved.