DATASETS Procedure

SELECT Statement

Selects SAS files for copying.
Restrictions: Must follow a COPY statement

Cannot appear with an EXCLUDE statement in the same COPY step

Manipulating SAS Files

Syntax

Required Argument

SAS-file-1 <...SAS-file-n>
specifies one or more SAS files that you want to copy. All of the SAS files that you name must be in the data library that is referenced by the libref named in the IN= option in the COPY statement. If the SAS files have generation groups, the SELECT statement allows only selection of the base versions.

Optional Arguments

ALTER=alter-password
provides the Alter password for any alter-protected SAS files that you are moving from one data library to another. Because you are moving and thus deleting a SAS file from a SAS library, you need Alter access. You can use the option either in parentheses after the name of each SAS file or after a forward slash.
MEMTYPE=mtype
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.
Alias:MTYPE= and MT=
Default: If you do not specify the MEMTYPE= option in the PROC DATASETS statement, in the COPY statement, or in the SELECT statement, the default is MEMTYPE=ALL.

Details

Selecting Several Like-Named Files

You can use shortcuts for listing several SAS files in the SELECT statement:
Notation
Meaning
x1–xn
Specifies files X1 through Xn. The numbers must be consecutive.
x:
Specifies all files that begin with the letter X.