f



Re: SAS Macro to delete a SAS dataset 196997

> From: SAS Techies
> Subject: SAS Macro to delete a SAS dataset
>
> Here's a simple SAS Macro to delete a SAS dataset...It takes the name
of
> the SAS dataset as the parameter...
>
> %macro deletedsn(dsname);
>
> %if %index(&dsname,'.') eq 0  %then %do; %let lib=work; %let
> dsn=&dsname; %end;
> %else %if %index(&dsname,'.') eq 0  %then %do; %let lib=%scan(&dsname,
> 1,'.'); %let dsn=%scan(&dsname,1,'.'); %end;
>
> proc datasets lib=&lib nolist;
>  delete &dsn;
> quit;
> %mend deletedsn;
>
> %deletedsn(new);
> %deletedsn(somelib.new);
>
> Read more @

you're working too hard, and providing slow code

proc delete is faster than either proc datasets or sql drop table:

http://www.sascommunity.org/wiki/PROC_Delete

Ron Fehd  the module/routine/subroutine maven  CDC Atlanta GA USA RJF2
at cdc dot gov
0
rjf2 (3342)
12/3/2009 2:17:20 PM
comp.soft-sys.sas 142828 articles. 3 followers. Post Follow

0 Replies
1419 Views

Similar Articles

[PageSpeed] 44

Reply: