1.
** sashelp.prdsale has more than 100 observations
%macro test;
data out;
set sashelp.prdsale nobs=totalobs;
if totalobs>10 then do;
%let rc=high; end;
else do; %let rc=low; end; run;
%mend;
%let rc=Before Execution;
%put &rc;
why is the result low?
2.
libname A 'SAS library reference';
libname F 'SAS library reference';
options fmtsearch=(A F.X);
what is the second location searched for formats?
The tutorial says
work.formats->library.formats->A.formats->F.X
why is the answer work.formats as
o****o 发帖数: 8077
2
macro resolution operates at compilation, not at execution
the plain logic won't work on macro statements unless it is macro logic
control statements
【在 t****e 的大作中提到】 : 1. : ** sashelp.prdsale has more than 100 observations : %macro test; : data out; : set sashelp.prdsale nobs=totalobs; : if totalobs>10 then do; : %let rc=high; end; : else do; %let rc=low; end; run; : %mend; : %let rc=Before Execution;