Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
The DATASOURCE Procedure

RENAME Statement

RENAME old-name = new-name ... ;
The RENAME statement is used to change the names of variables in the output data sets. Any number of variables can be renamed in a single RENAME statement. The most recent RENAME specification overrides any previous ones for a given variable. The new-name is limited to thirty-two characters.

Renaming of variables is done at the output stage. Therefore, you need to use the old variable names in all other PROC DATASOURCE statements. For example, the series variable names DATA1-DATA350 used with annual COMPUSTAT files are not very descriptive, so you may choose to rename them to reflect the financial aspect they represent. You may rename "DATA51" to "INVESTTAX" with the RENAME statement

   rename data51=investtax;

since it contains investment tax credit data. However, in all other DATASOURCE statements, you must use the old name, DATA51.

Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
Top
Top

Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.