Hi:
The other issue I see with your code (beyond what Scott has noted with scope issues and the fact that you don't need a DATA _NULL_ step at all), is that &TODAY will hold today's date, but &DAY will hold the result of using the WEEKDAY format.
You can test the values of these 2 macro variables by doing this:
[pre]
%LET today=%SYSFUNC(DATE());
%LET DAY=%SYSFUNC(PUTN(&today,WEEKDAY.));
%put today= &today;
%put day= &day;
[/pre]
It seems to me that if you test &TODAY, you will be testing a date value and NOT the day of the week. So, scope issues aside, you might want to consider testing &DAY and not &TODAY. You can take care of some of the scope issues by using an explicit %GLOBAL statement.
Since the %IF must be used in a Macro program, you will still need the macro program definition for %YESTER. However you do NOT need the DATA _NULL_ and you must still resolve the scope issues if you plan/hope to use &YESTERDAY outside the scope of the local macro program environment.
cynthia