Hello! I am trying to pull in a bunch of monthly data files for departments. The way the files are structured is: year/month/department file.xlsx There are 43 different departments and I need to pull in the files from 16 different months for each department (then I will be appending them, but I know how to do that). First I created a macro that looks like this: %macro datapull(year=, month=, departmentname=) PROC IMPORT OUT=&deparmentname_&year_&month DATAFILE= "[first part of file path]/&year/&month/&departmentname" DBMS=xlsx REPLACE; RUN; %mend I really dont want to have to call the macro 43*16 times. What I am looking to do is have the macro re-run over the different gl codes and only have to specify which months I want to pull (I am not interested in automating the month part). I tried using %do departmentname= x, y, z; but that didnt work. Any help???
... View more