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 study design in while working with SAS? what are screening variables in SAS?
what other sas products have you used and consider yourself proficient in using? : Sas programming
State the difference between INFORMAT and FORMAT ?
What is the difference between %put and symbolgen? : sas-macro
What is interleaving in SAS?
how we can create a FLAG datasets? Ex:-ID age_group no_persons 1 to 10 10 to 20 3 11 to 20 21 to 30 7 21 to 3o 31 to 40 5
How to create an external dataset with sas code?
How can I remove header from output data set?
I am preparing SAS Certified Advanced Programmer for SAS 9 in 2014. If anybody has the latest dumps for this exam, please mail me at dhiman.mukherjee@gmail.com
What is the basic structure of a sas program?
how to generate the test data in sas without input data? : Sas-administrator
what is factor analysis? : Sas-administrator
what is the one statement to set the criteria of data that can be coded in any step? : Sas programming
what is the use of sas management console? : Sas-di
What are the limitations for memory allocation for SAS variables