First, make sure that the dates are stored internally as SAS dates. You can do this by checking the PROC CONTENTS output and looking at the data type (numeric) and display format (mmddyy.). If the contents show that the field is a character field, then you have more work to do.
IF DateDx > today() THEN datedx=.;
would change any future date to missing. You can change the expression after the IF to what you need.
If the date is actually a character string, then you first need to convert it to a date data type to do the comparison. For instance,
IF (INPUT(DateDx,mmddyy8.) > today() ) THEN DateDx=' ';
would accomplish a similar task. You may want to convert the text-date permanently to date data types.
One last thing. If your data are coming from a relational database (e.g. Oracle, SQL/Server), then the underlying field is a date-time, even though it may display as a date. You will need to either extract the date part (DATEPART is the function name) or adjust the comparisons to account for the different scaling.
Doc Muhlbaier
Duke