1
votes

I have a program where few datasets are created dynamically through a macro. Datasets are also named dynamically.

For example: STAT_FILE_1, STAT_FILE_2

Sometimes my macro may create two datasets, STAT_FILE_1, STAT_FILE_2

and sometimes, three STAT_FILE_1, STAT_FILE_2, STAT_FILE_3

and the number may vary depending on the source data.

I am using PROC FREQ to have a summary data for the last/recent dataset.

Hence I am using the below code

PROC FREQ;
tables YEAR;
run;

I am getting the result, however i am not able to find out the dataset name used. Can some please help me in finding the dataset name which is used in PROC FREQ.

1
This will show you the last table created:%put &syslast;Stig Eide
Hi Stig, Thank you so much for your input! This is what i expected to give in my result.Kay
@StigEide Can you please post that as an answer?Joe

1 Answers

0
votes

This will show you the last table created:

%put &syslast;