I am learning SAS. I tested a function shown below, the function is to find the larger value of two integers. However, it kept reporting errors shown below. Could someone please help me with that? Thank you. %macro max(dat);
data _null_;
set &dat;
if x >= y then put x =;
else put y =;
%mend max;
data temp;
input x y;
cards;
7 3
;
run;
proc print data=temp;
run;
%max(temp); 2633 %max(temp);
NOTE: Line generated by the invoked macro "MAX".
1 data _null_; set &dat; if x >= y then put x =; else put y =;
-
22
200
ERROR: File WORK.DAT.DATA does not exist.
ERROR 22-322: Syntax error, expecting one of the following: a name, a quoted string, ;, CUROBS,
END, INDSNAME, KEY, KEYRESET, KEYS, NOBS, OPEN, POINT, _DATA_, _LAST_, _NULL_.
ERROR 200-322: The symbol is not recognized and will be ignored.
... View more