Here's a useful tip: The data set options (DROP, KEEP, RENAME, WHERE,...) are processed in alphabetical order. Therefore the KEEP statement is processed before the WHERE statement.
The best way to solve this problem is to use the WHERE statement (or a subsetting IF statement) in the body of the program and use the KEEP option for the output data set:
data want_month(keep=tbl_name);
date="&start_date"d;
do while (date<="&end_date"d);
output;
date=intnx('day', date, 1);
date_ddmmyyyy=put(date,ddmmyyn8.);
tbl_name=CATS("RRR.NewMethologyInput",date_ddmmyyyy);
end;
format date date9.;
if (date>"&start_date"d); /* could also use a WHERE clause here */
run;