ACCESS Procedure Reference |
Applies to: | access descriptors and view descriptors |
Syntax |
Syntax |
RENAME variable-identifier = SAS-variable-name
|
The RENAME statement enters or modifies the SAS variable name that is associated with a database item. You cannot use the RENAME= statement if ASSIGN=YES is specified in the access descriptor from which the view descriptor is derived.
When creating an access descriptor and ASSIGN=YES, you can use the RENAME statement to assign new SAS names to the default SAS names, and these new names will always be used when creating view descriptors based on the access descriptor.
When creating an access descriptor and ASSIGN=NO, any names assigned in the access descriptor can be changed in the view descriptor by using the RENAME statement, but the new name applies only in that view.
variable-identifier can be one of the following:
the current SAS variable name for the item
Note: Any name on the left side of the equal sign (=) must be a SAS name, not a SYSTEM 2000 name. In an access descriptor, if the ASSIGN statement is omitted, you must use the item number or the component number (C-number) on the left side of the equal sign (=).
the positional equivalent, which is the number that represents the item's place in the descriptor, as specified in the LIST statement.
For example, if you want to modify the SAS variable names associated with the fourth and fifth items in a descriptor, submit the following statement:
rename 4=hire birthday=birth;
When creating a view descriptor, the RENAME statement automatically selects the renamed item for the view. That is, if you rename the SAS variable associated with a database item, you do not have to issue a SELECT statement for that item.
Copyright © 2007 by SAS Institute Inc., Cary, NC, USA. All rights reserved.