SASUnit Examples  Version 1.2
_sasunit_tempfilename.sas
Go to the documentation of this file.
1 
29 %MACRO _sasunit_tempFileName(r_TempFile);
30 
31 /* create empty dataset */
32 DATA;STOP;RUN;
33 
34 /* store to macro variable */
35 %LET &r_TempFile=&syslast;
36 %PUT Temporary dataset %nrstr(&)&r_tempFile is &&&r_tempFile;
37 
38 /* delete again, need only name */
39 PROC SQL NOPRINT;
40  DROP TABLE &&&r_TempFile;
41 QUIT;
42 
43 /* store number of first dataset to l_first_temp */
44 %IF %symexist (l_first_temp) %THEN %DO;
45  %IF &l_first_temp = %THEN %LET l_first_temp = %substr(&syslast,10);
46 %END;
47 
48 %MEND _sasunit_tempFileName;