Chapter Contents

Previous

Next
The DATASETS Procedure

DELETE Statement


Deletes SAS files from a SAS data library.

Featured in: Manipulating SAS Files


DELETESAS-file(s)
</ <ALTER=alter-password>
<GENNUM=ALL|HIST|REVERT|integer>
<MEMTYPE=mtype>>;


Required Arguments

SAS-file(s)
specifies one or more SAS files that you want to delete.


Options

ALTER=alter-password
provides the alter password for any alter-protected SAS files that you want to delete. You can use the ALTER= option in parentheses after the name of each SAS file or after a forward slash.
See also: Using Passwords with the DATASETS Procedure

GENNUM=ALL|HIST|REVERT|integer
restricts processing to the specified generation files. Valid values for GENNUM= are

ALL
refers to the base name and all generations.

HIST
refers to all generations (excludes the base name).

REVERT
refers to deleting the base name and changing the most current generation file, if it exists, to the base name.

postive integer
refers to an explicit generation file.

negative integer
refers to a relative generation file.

MEMTYPE=mtype
restricts processing to one member type (mtype).
Aliases: MT=, MTYPE=
Default: DATA
See also: Restricting Member Types Available for Processing
Featured in: Manipulating SAS Files


Details


Working with Generation Groups
When you are working with generation groups, you can use the DELETE statement to


Delete the Base Name and All Generations


Delete the Base Name and Rename Youngest Generation to the Base Name


Delete a Specific Generation


Delete a Relative Generation


Delete all Generations and Leave the Base Name


Chapter Contents

Previous

Next

Top of Page

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