How do you add a number to a macro variable?
Answers were Sorted based on User's Feedback
Answer / hsong001
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;
| Is This Answer Correct ? | 9 Yes | 0 No |
Can you calculate the mean, median and mode of the following data set using data step logic? Don't use any function or procedure. data a; input age @@; datalines; 22 32 32 32 43 23 24 56 45 54 28 29 27 26 25 28 30 20 18 37 36 47 46 56 19 20 ; run; I have calculated the mean which i have posted in the answer section.
What is a macro routine?
What is the difference between a PROC step and a DATA step?
what is the difference between SET and MERGE?
tell me about intnx, intcx functions?
what is the prob plot in clinical domain
How can sas program be validated?
how sas deals with business intelligence? : Sas-bi
what is Difference between PROC SQL JOINS and MERGE?
How would you code a merge that will keep only the observations that have matches from both sets?
Identify statements whose placement in the DATA step is critical?
if x=round(26.3,10)-1 then x= how much and how explain?