SAS Question:
How to add a number to a macro variable?

Answer:
Use %eval to do simple calculation for macro variables.
e.g.,
data _null_;
%let a = 1;
%let b = %eval(&a+1);
%put a=&a b=&b;
run;
e.g.,
data _null_;
%let a = 1;
%let b = %eval(&a+1);
%put a=&a b=&b;
run;
Previous Question | Next Question |
How to CREATE an external dataset with sas code? | Code the tables statement for a single-level (most common) frequency? |