Do i have to use %macro dt_convert (dtx , dt); if length(&dtx) = 4 then &dt = mdy(01,01,input(&dtx,4.)); else &dt = input(&dtx , mmddyy10.); %mend dt_convert; as i am using above code before the new code and still getting the same log erros if died = . then birthdead = put(year(birth,4.); /* assigning _ 22 3 The SAS System 16:08 Sunday, November 6, 2016 76 68 ! result value when no died date = just birth YYYY */ ERROR 22-322: Syntax error, expecting one of the following: !, !!, &, *, **, +, ',', -, /, <, <=, <>, =, >, ><, >=, AND, EQ, GE, GT, IN, LE, LT, MAX, MIN, NE, NG, NL, NOT, NOTIN, OR, ^, ^=, |, ||, ~, ~=. ERROR 76-322: Syntax error, statement will be ignored.
... View more