The DATASETS Procedure |
Featured in: | Manipulating SAS Files |
EXCHANGE name-1=other-name-1
<...name-n=other-name-n> </ <ALTER=alter-password> <MEMTYPE=mtype>>; |
Required Arguments |
exchanges the names of SAS files in the procedure input library. Both name and other-name must already exist in the procedure input library.
Options |
provides the alter password for any alter-protected SAS files whose names you want to exchange. 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 to one member type. You can exchange only the names of SAS files of the same type. You can use the option either in parentheses after the name of each SAS file or after a forward slash.
Default: | If you do not specify MEMTYPE= in the PROC DATASETS statement, the default is ALL. |
See also: | Restricting Member Types for Processing |
Details |
When you exchange more than one pair of names in one EXCHANGE statement, PROC DATASETS performs the exchanges in the order that the names of the SAS files occur in the directory listing, not in the order that you list the exchanges in the EXCHANGE statement.
If the name SAS file does not exist in the SAS library, PROC DATASETS stops processing the RUN group that contains the EXCHANGE statement and issues an error message. To override this behavior, specify the NOWARN option in the PROC DATASETS statement.
The EXCHANGE statement also exchanges the associated indexes so that they correspond with the new name.
The EXCHANGE statement only allows two existing generation groups to exchange names. You cannot exchange a specific generation number with either an existing base version or another generation number.
Copyright © 2010 by SAS Institute Inc., Cary, NC, USA. All rights reserved.