![]() Chapter Contents |
![]() Previous |
![]() Next |
| RENAME= |
| Valid in: | DATA step and PROC steps |
| Category: | Variable control |
| Syntax | |
| Syntax Description | |
| Details | |
| Comparisons | |
| Examples | |
| Example 1: Renaming a Variable at Time of Output | |
| Example 2: Renaming a Variable at Time of Input | |
| See Also | |
Syntax |
| RENAME=(old-name-1=new-name-1 < . . . old-name-n=new-name-n>) |
| Details |
proc print data=test(rename=(score1=score2));
| Comparisons |
| Examples |
This example uses RENAME= in the DATA statement to show that the variable is renamed at the time it is written to the output data set. The variable keeps its original name, X, during the DATA step processing:
data two(rename=(x=keys)); set one; z=x+y; run;
data three; set one(rename=(x=keys)); z=keys+y; run;
| See Also |
Data Set Options:
| |||||
Statements:
| |||||
| "The DATASETS Procedure" in the SAS Procedures Guide |
![]() Chapter Contents |
![]() Previous |
![]() Next |
![]() Top of Page |
Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.