just to introduce another idea:
Although the datepart() function has achieved what was called for, it isn't really neccessary.
But that's OK here, because for such small data volumes, performance is not an issue.
However, where data base volumes are significant, for testing a datetime value against a date constant, just extend the constant with 0 time information. Rather than applying a datepart() function on every row, extending the constant happens only once. For example[pre]proc sql ;
create table vtable as select * from sashelp.vtable
where libname = 'WANTED'
& modate lt "%sysfunc( sum( '&sysdate'd, -3), date9):0:0:0"dt
;
quit ;[/pre]
PeterC