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.