I'm trying to run a macro that gives counts of widgets by date. The macro give me a count of scheduled deliverables and a count of acutal deliverables for a given day. I want to loop through this macro "N" times, based on the dates that are in a separate table. This table would contain dates for the year that are work days, excluding holidays and weekends.
Ultimately, I'd like to set up the date table such that I have dates for the next few years, and set the code so that it controls for when the date in the control table doesn't exceed the current date.
Here's the macro as it currently stands:
%macro takt(rptdate); proc sql; create table takt_data as select "&rptdate" as report_date, sum(ship_date = input("&rptdate",mmddyy10.)) as actual, sum(contract_date = input("&rptdate",mmddyy10.)) as planned, calculated actual / calculated planned as takt_index from shippinglog where substr(project,1,2) <> "CD" ; quit; proc append base = takt data = takt_data force; quit; %mend takt; %takt(09/01/2016); %takt(09/02/2016); %takt(09/05/2016); %takt(09/06/2016); %takt(09/07/2016); %takt(09/08/2016); %takt(09/09/2016); %takt(09/12/2016); %takt(09/13/2016); %takt(09/14/2016); %takt(09/15/2016); %takt(09/16/2016); %takt(09/19/2016); %takt(09/20/2016);
... View more