DATASETS Procedure

EXCLUDE Statement

Excludes SAS files from copying.
Restrictions: Must follow a COPY statement

Cannot appear in the same COPY step with a SELECT statement

Manipulating SAS Files


Required Argument

SAS-file-1 <...SAS-file-n>
specifies one or more SAS files to exclude from the copy operation. All SAS files you name in the EXCLUDE statement must be in the library that is specified in the IN= option in the COPY statement. If the SAS files are generation groups, the EXCLUDE statement allows only selection of the base versions.
You can use the following shortcuts to list several SAS files in the EXCLUDE statement:
Specifies files X1 through Xn. The numbers must be consecutive.
Specifies all files that begin with the letter X.

Optional Argument

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=, MT=
Default:If you do not specify MEMTYPE= in the PROC DATASETS statement, the COPY statement, or in the EXCLUDE statement, the default is MEMTYPE=ALL.


Excluding Several Like-Named Files

You can use shortcuts for listing several SAS files in the EXCLUDE statement.