How do you add a number to a macro variable?

Answer Posted / hsong001

Use %eval to do simple calculation for macro variables.
e.g.,
data _null_;
%let a = 1;
%let b = %eval(&a+1);
%put a=&a b=&b;
run;

Is This Answer Correct ?    9 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is interleaving in SAS?

673


Name some categories in sas 9? : sas-grid-administration

559


What does P-value signify about the statistical data?

853


explain the difference between alternate key, business key, foreign key, generated key, primary key, retained key and surrogate key ? : Sas-di

543


what is metadata? : Sas-bi

600






what are the benefits of data integration? : Sas-di

540


Give some ways by which you can define the variables to produce the summary report (using proc report)?

599


If a variable contains only numbers, can it be a character data type?

612


what do you mean by data staging area? : Sas-di

605


how does sas handle missing values in procs? : Sas programming

636


what are input dataset and output dataset options? : Sas programming

563


What is the function of output statement in a SAS Program?

616


Which command is used to perform sorting in sas program?

599


How do you delete duplicate observations in sas?

575


how to generate the test data in sas without input data? : Sas-administrator

578