The DATASETS Procedure |
Featured in: | Manipulating SAS Files |
CHANGE old-name-1=new-name-1
<...old-name-n=new-name-n > </ <ALTER=alter-password> <GENNUM=ALL|integer> <MEMTYPE=mtype>>; |
Required Arguments |
changes the name of a SAS file in the input data library. old-name must be the name of an existing SAS file in the input data library.
Featured in: | Manipulating SAS Files |
Options |
provides the alter password for any alter-protected SAS files named in the CHANGE statement. Because a CHANGE statement changes the names of SAS files, you need alter access to use the CHANGE statement for new-name. You can use the option either in parentheses after the name of each SAS file or after a forward slash.
See also: | Using Passwords with the DATASETS Procedure |
restricts processing for generation data sets. You can use the option either in parentheses after the name of each SAS file or after a forward slash. The following list shows valid values:
refers to the base version and all historical versions of a generation group.
refers to a specific version from a generation group. Specifying a positive number is an absolute reference to a specific generation number that is appended to a data set's name; that is, gennum=2 specifies MYDATA#002. Specifying a negative number is a relative reference to a historical version in relation to the base version, from the youngest to the oldest; that is, gennum=-1 refers to the youngest historical version.
For example, the following statements change the name of version A#003 to base B:
proc datasets; change A=B / gennum=3; proc datasets; change A(gennum=3)=B;
The following CHANGE statement produces an error:
proc datasets; change A(gennum=3)=B(gennum=3);
See also: |
|
restricts processing to one member type. You can use the option either in parentheses after the name of each SAS file or after a forward slash.
Aliases: | MTYPE=, MT= |
Default: | If you do not specify MEMTYPE= in the PROC DATASETS statement, the default is MEMTYPE=ALL. |
See also: | Restricting Member Types for Processing |
Details |
The CHANGE statement changes names by the order that the old-names occur in the directory listing, not in the order that you list the changes in the CHANGE statement.
If the old-name SAS file does not exist in the SAS library, PROC DATASETS stops processing the RUN group containing the CHANGE statement and issues an error message. To override this behavior, use the NOWARN option in the PROC DATASETS statement.
If you change the name of a data set that has an index, the index continues to correspond to the data set.
Copyright © 2010 by SAS Institute Inc., Cary, NC, USA. All rights reserved.