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