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 is the use of proc contents and proc print in sas? : Sas-administrator
explain what is data set in sas? : Sas-administrator
How would you identify a macro variable?
what r the job openings SAS for fresher graduates !
This entry was posted in General. Bookmark the permalink. Post a comment or leave
Mention what are the data types does SAS contain?
How to sort in descending order?
Describe the ways in which you can create a macro variable?
Describe 5 ways to do a “table lookup” in SAS?
what do the mod and int function do? What do the pad and dim functions do? : Sas programming
Can you suggest us materials for sdtm mapping?
How to limit decimal places for the variable using proc means?
For a user to have access to a standard workspace server, is internal authentication alone is sufficient? : sas-grid-administration
Explain the difference between informat and format with an example.
what is the effect of the options statement errors=1? : Sas programming