The code is straightforward, to get the dif from two variables. The dataset has the two variables, which are both of numeric. But the one inside marco complains. The "same" code works ok without macro. Anyone?!
MPRINT(DOLOOP): proc sql ;
MPRINT(DOLOOP): select avg(IF)-avg(dlastprice) into: lpadj from hs300_0604 ;
ERROR: The AVG summary function requires a numeric argument.
MPRINT(DOLOOP): 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.00 seconds
59956 proc sql;
59957 select avg(IF)-avg(dlastprice) from hs300_0604 ;
59958 quit;
NOTE: PROCEDURE SQL used (Total process time):
real time 0.03 seconds
cpu time 0.01 seconds
... View more