Hi Patrick: Thank you for your response. SAS codes: %macro do_over(values, between, phrase); %mend; proc sql; create table Kothari_1 as select a.*, b.intercept + %do_over(values=inv_at_l drevadj ppe roa, between=%str(+), phrase=a.? * b.?) as fitted, a.tac - calculated fitted as DA_Kothari_w_minm10, abs (calculated DA_Kothari_w_minm10) as ABSDA_Kothari_w_minm10 from main_sample_w a left join kothari_w b on a.sic2 = b.sic2 and a.fyear = b.fyear and b._EDF_ > 5 ; quit; Log: 18037 %macro do_over(values, between, phrase); 18038 %mend; 18039 18040 proc sql; 18041 create table Kothari_1 as 18042 select a.*, b.intercept + %do_over(values=inv_at_l drevadj ppe roa, between=%str(+), 18042! phrase=a.? * b.?) as fitted, ------ 22 ERROR 22-322: Syntax error, expecting one of the following: !, !!, &, (, *, **, +, ',', -, '.', /, <, <=, <>, =, >, >=, ?, AND, AS, CONTAINS, EQ, EQT, FROM, GE, GET, GT, GTT, LE, LET, LIKE, LT, LTT, NE, NET, OR, ^=, |, ||, ~=. 18043 a.tac - calculated fitted as DA_Kothari_w_minm10, 18044 abs (calculated DA_Kothari_w_minm10) as ABSDA_Kothari_w_minm10 18045 from main_sample_w a left join kothari_w b 18046 on a.sic2 = b.sic2 and a.fyear = b.fyear 18047 and b._EDF_ > 5 ; 18048 quit; NOTE: The SAS System stopped processing this step because of errors. NOTE: PROCEDURE SQL used (Total process time): real time 0.00 seconds cpu time 0.01 seconds
... View more