Chapter Contents

Previous

Next
The DATASETS Procedure

CHANGE Statement


Renames one or more SAS files in the same SAS data library.

Featured in: Manipulating SAS Files


CHANGEold-name-1=new-name-1
<...old-name-n=new-name-n>
</ <ALTER=alter-password>
<GENNUM=ALL|integer>
<MEMTYPE=mtype>>;


Required Arguments

old-name=new-name
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

ALTER=alter-password
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. You can use the ALTER= option in parentheses after new-name or after a forward slash.
See also: Using Passwords with the DATASETS Procedure

GENNUM=ALL|integer
restricts processing to a single generation file or to the entire generation group. Valid values for GENNUM= are

ALL
refers to the base name and all generation files of a generation group.

postive integer
refers to an explicit generation file.

negative integer
refers to a relative generation file.

The following statements change the name of A(GENNUM=3) to 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);

MEMTYPE=mtype
restricts processing to one member type (mtype).
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 Available for Processing


Details


Chapter Contents

Previous

Next

Top of Page

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