09-22-2016 03:50 PM
Other than not seeing a Proc SQL; at the start
what is the value of &_input1? Does it actually match an existing data set?
Does that data set actually have any records where Completion_status_no=0?
09-22-2016 03:54 PM - last edited on 09-22-2016 04:16 PM by Reeza
/* ADM.HRSC.TRNG.TR.Fully */ %if (&_COST_OBJECT eq ADM.HRSC.TRNG.TR.Fully) %then %do; proc sql; create table &_OUTPUT1 as select distinct COST_OBJECT, BUSINESS_LINE_CODE, BUSINESS_LINE, NEW_DIER_CODE, 'ADM.HR' as SourceDIER, '# of Training Classes' as DriverName, sum(Completion_status_no) as VOLUME, Location from &_INPUT1 where Completion_status_no=1 group by COST_OBJECT, BUSINESS_LINE_CODE, BUSINESS_LINE, NEW_DIER_CODE, Location; create table work.OUTP2 as select * , 'BLANK' as Completion_Status, 'BLANK COMPLETION STATUS' as ERROR_MESSAGE from &_INPUT1 (drop=Completion_Status) where Completion_status_no=0 quit; %end;
##- Please type your reply above this line. Simple formatting, no
09-22-2016 09:50 PM
Create global macro variables such as
and test the SQL or DATA steps outside of your macro. You should be able to pinpoint the troublesome step by checking the log. If every step works as intended, then the problem is with macro logic.