Answer Posted / saurabh gupta
To add a number in macro use %EVAL macro
Example
%Let a= 2;
%Let b= 3;
%Let c= &a + &b ;
then it will give you value
c=2 + 3
but If you will use %eval it will give you sum
%Let c= %eval(&a + &b)
Now this will give you the correct answer
c=5
| Is This Answer Correct ? | 15 Yes | 0 No |
Post New Answer View All Answers
What are the 3 components in sas programming?
What would you change about your job?
For clinical entire study how many tables will create approx?
If money were no object, what would you like to do?
how many types of prompts are there? : Sas-bi
Mention what are the data types does SAS contain?
what is the difference between infile and input? : Sas-administrator
What are the data types in sas?
Describe the function and utility of the most difficult SAS macro that you have written?
What are the different servers in sas? : sas-grid-administration
how to read the variables in sas? : Sas-administrator
how does sas handle missing values in: assignment statements, functions, a merge, an update, sort order, formats, procs? : Sas programming
how can you put a "trace" in your program? : Sas programming
Difference between informat and format?
What are the differences between sum function and using “+” operator?