data date; input sdate $10.; datalines; 1990 5 12 2001 10 10 2010 8 2018 1990 20 1 2017 12 2016 5 2017 15 12 2017 ; run; I want 2 variables which are in bold with the below conditons New date= variable if day is missing then set to 15 if day and month missing then set to january 01 if day,month & year are missing then set to today's date Abbreviation = variable if day is missing then set to D if day and month missing then set to M if day,month & year are missing then set to Y Create brthdtc and dtcflag variables by using day, month & year variables.
... View more