SASUnit Examples  Version 1.5.0
_deltempfiles.sas
Go to the documentation of this file.
1 
26 %MACRO _delTempFiles;
27 
28  %IF NOT %symexist(g_deltempfiles_debug) %THEN %DO;
29 
30  DATA _null_;
31  SET sashelp.vtable END=eof;
32  WHERE libname = 'WORK' AND memname LIKE 'DATA%';
33  IF _n_=1 THEN
34  CALL EXECUTE ('PROC SQL NOPRINT;');
35  %IF %symexist(l_first_temp) %THEN %DO;
36  %IF &l_first_temp NE %THEN %DO;
37  IF input(substr(memname,5),8.) >= &l_first_temp;
38  %END;
39  %END;
40  CALL execute ('DROP TABLE ' !! memname !! ';');
41  IF eof THEN
42  CALL execute ('QUIT;');
43  RUN;
44 
45  %END;
46 
47 %MEND _delTempFiles;