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 / nani

%macro add(a,b);
%if (%datatyp(&a)=NUMERIC and %datatyp(&b)=NUMERIC) %then %
do;
%put The result is %sysevalf(&a+&b).;
%end;
%else %do;
%put Error: Addition requires numbers.;
%end;
%mend add;

You can invoke the ADD macro as:

%add(5.1E2,225)

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the role of unrestrictive users? : sas-grid-administration

966


I need level 2 to 5 sas using companies in india

2336


In ARRAY processing, what does the DIM function do?

1123


what are sas bi dashboard components? : Sas-bi

1120


how the sas basic syntax style described? : Sas-administrator

974


how can you create zero observation dataset? : Sas programming

1097


Are you involved in writing the inferential analysis plan? Tables specfications?

2515


how would you create multiple observations from a single observation? : Sas programming

958


what does the run statement do? : Sas programming

1002


Will it bother you if the guy at the next desk times the frequency and duration of your bathroom or coffee breaks on the grounds that ?you are getting paid twice as much as he is??

2559


What are the default statistics that proc means produce?

979


is data integration and etl programming is same? : Sas-di

1015


What are the different types of sas functions?

1196


What is the work of tranwrd function?

1189


i have a dataset with 100 obs i want to generate title from 20th obs onwards with total observations. that should contain 100 obs.dont use firstobs and dnt split the data. use dataset block or proc report? how can we genarate;

2444