I have defined macro variables nclass, n0, n1, ..., n&nclass, and response, then I have the following code: proc sql undo_policy=none; create table temp as select *, case %do k=1 %to &nclass; when &n%eval(&k-1) le myvar le &&n&k then %scan(&response,&k," ") %end; else . end as RC from temp; quit; The problem with the above code is: &n%eval(&k-1), there is no problem with &&n&k. Basically it evaluates &n then combine with 0 when k=1. If n is not defined, then it will have unresolved macro variable N problem; if n is defined as 357, for instance, then it will give 3570 for &n%eval(&k-1) when k=1. What I really want is the value of macro variable n0. Even when I use &&n%eval(&k-1), it still does not work. How can I represent the value of n0 when k=1?
... View more