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
how do you test for missing values? : Sas programming
what do the sas log messages "numeric values have been converted to character" mean? What are the implications? : Sas programming
what techniques and/or procs do you use for tables? : Sas programming
What are the table names in oracle database...?
How would you define the end of a macro? : sas-macro
what is change analysis in sas di ? : Sas-di
what is sas enterprise intelligence architecture? : Sas-bi
name the scheduler for scheduling job and explain the scheduler? : Sas-di
What is the use of divide function?
What are the new features included in the new version of SAS Programming Language?
what is operational data and operational system? : Sas-di
If you could design your ideal job, what would it look like?
What are the automatic variables for macro? : sas-macro
What is the length assigned to the target variable by the scan function?
What is the role of unrestrictive users? : sas-grid-administration