Previous Page | Next Page

Language Reference

DELETE Call

CALL DELETE( <libname,> member-name ) ;

The DELETE call deletes one or more SAS data sets. The arguments to the DELETE subroutine are as follows:

libname

is a character matrix or quoted literal that contains the name of one or more SAS data libraries.

member-names

is a character matrix or quoted literal that contains the names of one or more data sets.

The DELETE subroutine deletes SAS data sets in a specified library. If you omit the libname argument, the default SAS data library is used. (See the DEFLIB= option in the description of the RESET statement.)

The following statements use the DATA step to create several data sets and then delete them by using the DELETE subroutine in SAS/IML software:

data a b c d e;            /* create data sets in WORK */
   x=1; 
run;

proc iml;
call delete(work,a);       /* deletes WORK.A  */

reset deflib=work;         /* sets default libname to WORK */
call delete(b);            /* deletes WORK.B */

members = {"c" "d"};
call delete(members);      /* deletes WORK.C and WORK.D */

ds = datasets("work");     /* returns all data sets in WORK */
call delete("work",ds[1]); /* deletes first data set */
Previous Page | Next Page | Top of Page