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 data governance? : Sas-di
Mention the category in which sas informats are placed?
how does sas handle missing values in procs? : Sas programming
Explain how you can debug and test your SAS program?
What are the new features included in the new version of SAS Programming Language?
Of all your work, where have you been the most successful?
how does sas handle missing values in formats? : Sas programming
how does sas handle missing values in: assignment statements, functions, a merge, an update, sort order, formats, procs? : Sas programming
What is interleaving in SAS?
describe about metadata object? : Sas-di
What is maximum storage capability of SAS?
is data integration and etl programming is same? : Sas-di
Which function is used to count the number of intervals between two sas dates?
what is the use of sas management console? : Sas-di
do you need to know if there are any missing values? : Sas programming