Chapter Contents

Previous

Next
RENAME

RENAME



Renames PC file columns.

Optional statement
Interacts with: DELETE, LABEL, RESET


Syntax
Details

Syntax

RENAME variable-identifier-1=<'>column-name-1<'>
<...variable-identifier-n =<'>column-name-n<'>>;


Details

The RENAME statement changes the names of the PC file's columns that are associated with the listed SAS variables. If you omit the RENAME statement, all the column names default to the corresponding SAS variable names (unless the LABEL statement is specified).

The variable-identifier argument can be either the SAS variable name or the positional equivalent from the LIST statement. The positional equivalent is the number that represents the variable's place in the data set. For example, if you want to rename the column associated with the third SAS variable, submit the following statement:

rename 3='employname';

The column-name argument must be a valid PC file column name. If the column name includes lowercase characters, special characters, or national characters, you must enclose the column name in quotes.

The RENAME statement enables you to include variables that you have previously deleted. For example, suppose you submit the following statements:

delete 3;
rename 3='empname';

The DELETE statement first drops the third variable. Then the RENAME statement includes the third variable and assigns the name EMPNAME and the default column type to it.

You can rename as many variables as you want in one RENAME statement. The RENAME statement overrides the LABEL statement for columns that are renamed. COLUMN is an alias for the RENAME statement.

An editing statement, such as RENAME, must be specified after the database-description statements when you create and load a PC file. See LOAD for more information.


Chapter Contents

Previous

Next

Top of Page

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