Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

How do you add a number to a macro variable?

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


Please Help Members By Posting Answers For Below Questions

what is the use of proc contents and proc print in sas? : Sas-administrator

1064


explain what is data set in sas? : Sas-administrator

992


How would you identify a macro variable?

1093


what r the job openings SAS for fresher graduates !

2458


This entry was posted in General. Bookmark the permalink. Post a comment or leave

4576


Mention what are the data types does SAS contain?

1153


How to sort in descending order?

1259


Describe the ways in which you can create a macro variable?

1084


Describe 5 ways to do a “table lookup” in SAS?

1154


what do the mod and int function do? What do the pad and dim functions do? : Sas programming

1171


Can you suggest us materials for sdtm mapping?

4448


How to limit decimal places for the variable using proc means?

1071


For a user to have access to a standard workspace server, is internal authentication alone is sufficient? : sas-grid-administration

1010


Explain the difference between informat and format with an example.

1169


what is the effect of the options statement errors=1? : Sas programming

1061