I'm trying to check if the value in the DOB field is greater than a given date. My code is parametrized by year of service. For instance, when I have the reference date as '31Dec2010'd, it works fine. But when part of it contains a reference to another macro variable, I get an error message.
%let yos = 2010;
and inside a data step, I have
if date_of_birth > '31Dec&yos.'d
... some code follows. Then I get the following error message: "invalid date/time/datetime constant '31Dec&yos.'d
.
Any ideas, Thanks