I have two macro variables:
runasofdate
with value'20190107'
process_weekend
that will be either'Y'
or'N'
Both macro variables are from an Excel config file and assigned using call symput
.
Then I have a table with list of local holidays:
HOLIDAY_DESC HOLIDAY_DATE
HOLIDAY1 20190101
HOLIDAY2 20190409
HOLIDAY3 20190418
HOLIDAY4 20190419
HOLIDAY5 20190501
I need help with coding a macro:
If &runasofdate is in the table HOLIDAY column HOLIDAY_DATE, then abort process
Else if &runasofdate falls on a weekend and the macro process_weekend is in 'N' then abort process
Else if &runasofdate falls on a weekend and the process_weekend ='Y' then call sas programs (via %include)
Else if &runasofdate falls on a weekday then
call sas programs (via %include)